Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Location
    Simi Valley, CA
    Posts
    100
    Plugin Contributions
    0

    Default Margins & elements treated different in IE than FF?

    Hi

    I am making my logo with a "nav" bar appear along side it. This nav bar should appear "within" the logoWrapper (meaning 30px below top of logo wrapper). To achieve this I made the margin of #logo 30px.

    This is how it should look (pic taken in I.E.)



    However, this does not work the same way in FF. The element #logo still sits at the top of the parent element (#logoWrapper) and the margin for #logo seems to "push" the margin over logoWrapper. See pic in FF below.


    I've been struggling for days. Any suggestions? Thanks so much for any help!

  2. #2
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    541
    Plugin Contributions
    0

    Default Re: Margins & elements treated different in IE than FF?

    See here for the definitions of margins and paddings. When you add a margin to the logo. Is it outside as you can see in the second picture. There is extra white space. If you want to have this effect for th navigation bar inside, you have to add a top margin there.

  3. #3
    Join Date
    Feb 2009
    Location
    Simi Valley, CA
    Posts
    100
    Plugin Contributions
    0

    Default Re: Margins & elements treated different in IE than FF?

    Hi, thanks for responding. This is what I have in my stylesheet:

    #logo {
    margin-top: 30px;
    }

    As you can see this works in i.e. but not FF. In FF the logo does not get "pushed" down being within the logoWrapper. It is as if it doesn't create a margin -top from the logoWrapper element but it does it push it down from navMainWrapper...but only in FF. Why?

    I think I have a pretty good understanding about padding (inside the element with relation to the content) and margins (outside the element with relation to the next element).

    Thanks for any help!

    MC

  4. #4
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    541
    Plugin Contributions
    0

    Default Re: Margins & elements treated different in IE than FF?

    Great that your understanding is soo good.

    The easiest to solve this is to post a link to your website. Or at least the html and css code or the particular region. Or Install Firebug for Firefox to see what the problem is.

    As you might see, the second picture, the margin above the image is 30px. I guess this is the content of your logo. The navigation bar inside does not have any margin. So i guess the navigation element has a different css class identifier.

 

 

Similar Threads

  1. Layout & Margins
    By annettes in forum Templates, Stylesheets, Page Layout
    Replies: 19
    Last Post: 7 May 2011, 11:33 PM
  2. Layout different in IE than FF, Safari, & Netscape
    By maperr55 in forum General Questions
    Replies: 2
    Last Post: 22 Sep 2008, 03:28 AM
  3. centering of search & other elements different in IE & firefox
    By sgflowers in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Sep 2006, 10:08 AM
  4. Problem with different margins when changed width of sideboxes
    By parsek in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Jul 2006, 04:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR