Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

IE Padding fix?

  • 23-06-2007 10:01PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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