Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

IE Padding fix?

Options
  • 23-06-2007 10:01pm
    #1
    Registered Users Posts: 7,041 ✭✭✭


    All the pages I've build I noticed they didn't look right in FF so I did some research to find out that it was IEs error but I couldn't find a fix for it. Can somebody here help me?

    The problem I'm having is that IE displays the padding inside the <div> will FF displays padding outside the <div> (which is correct) so how do I get IE to display it properly?

    Thanks,
    S.


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    padding is for inside the div area while margins are for outside.
    IE and FF treats them differently

    have you a link for us to look at?


  • Registered Users Posts: 8,488 ✭✭✭Goodshape


    Avoid putting padding/margin on an element which has width/height specified. If you need both, use two elements instead.
    <div style="width : 200px;">
         <div style="padding : 5px;">
             This text will have correct padding and width in both IE and FF.
         </div>
    </div>
    


  • Registered Users Posts: 7,041 ✭✭✭Seachmall


    Louie,
    The site I was in said that the padding is meant to be used to pad the outside of the <div> in releation to the entire page. Both make ideas make sense so I'm not sure which is which. I'll post a link to the site if I can find it again.

    Thanks GoodShape, it worked a treat.

    I placed the margins on my <p> istead of the main <div> and it works in both browsers.


    EDIT-
    Found the site, and you were right Louie. I read it wrong. It is FF bug although I'm sure that other sites said it was IEs. Anyway, heres the link. http://www.webmasterworld.com/forum83/5499.htm


Advertisement