Safari, Firefox difference handling negative margins?

I have a vertical navigation pulled right, outside of it’s container with a negative margin. The text flows appropriately…etc.

The trouble I’m running into, is with the fieldset on my forms. I have a 69px right margin on the fieldset to accommodate for the right floated nav. In Firefox, this margin seems to be calculated from the right edge of the container (Content) as I expected. Safari appears to be referencing the edge of the nav instead.

It’s easier if you view the site. Here’s the page that is most distinct:

What’s going on here? How can I fix it so that Safari behaves like FF?

It looks like everything will be fine in Safari if you remove the right margin on the fieldset.

fieldset {
    border: 1px dashed #555;
   [COLOR=Blue] margin: 0 0 1em 57px;[/COLOR][COLOR=Red]/*remove 69px right*/[/COLOR]
    background: url('../images/bgform.jpg') 0 0 repeat;
    padding: 15px;
    padding-top: 0;

Then the fieldset will naturally flow to the #nav’s left margin and be consistent in all browsers.

You have some errors in your html also. You need to close your form with </form>

You are also missing the forward slash when closing Content

<!-- Content –> <— what you have

</div><!-- Content –> <— what you need

Thanks for the catch…the validators hate me for my php code so I never caught those two tags…I think that did it. Once those were fixed along with removing the margin, everything looks great!

Thanks as always Rayzur!

I think I made it hard on myself by putting margins on all the block level guts of the site, rather than just building padding into the content area. What do you think?


#content {
    width: 722px;
p, h1, h2...etc {
    margin: 0 20px 0 20px;

Or this:

#content {
    width: 682px;
    padding: 0 20px 0 20px;

…and then not worry about the rest?

I’d use paddings on the content container. Much cleaner and all elements are affected by it, not just the ones you specify in your stylesheet, so option #2 is what I’d use.

I think I agree…easier to modify…everything’s in one place.