Cannot add margin to Legend element in Safari & Chrome

Posted by Graham on Stack Overflow See other posts from Stack Overflow or by Graham
Published on 2010-04-02T19:05:41Z Indexed on 2010/04/02 19:43 UTC
Read the original article Hit count: 628

Filed under:
|
|
|
|

I have some pretty straightforward markup:

<form action="">
    <fieldset class="compact">                  
        <legend>Member Tools</legend>
        <label for="username">Username</label>
        <input name="username" id="username" type="text"/>
        <label for="password">Password</label>
        <input name="password" id="password" type="password" />
    </fieldset>
</form>

I am attempting to add a small margin to the bottom of the Legend element, this works just fine in Firefox 2 and 3 as well as IE 5-8, however in Safari and Chrome adding a margin does nothing. As far as I know legend is just another block level element and Webkit should have no issue adding a margin to it, or am I incorrect?

© Stack Overflow or respective owner

Related posts about css

Related posts about legend