Safari & CSS Padding.

Posted:
in Genius Bar edited January 2014
I started teaching myself css last night. As I got into adding "padding", I started to run into trouble. For whatever reason, when I add padding in Safari (ex. padding: 10px it increases the size of the whole table. However, it looks and works fine in IE for the Mac & PC. Any ideas on what could be causing this? You can see the site here-

http://www.jeremiahrich.com



Thanks!

Comments

  • Reply 1 of 2
    igiligil Posts: 23member
    Padding is supposed to add to the size of elements. Look at the Box model documentation.



    The Microsoft programmers got it wrong and fixed it in IE 6.0 but it only works if you specify a DOCTYPE that reference a DTD like this:



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd">;



    Microsoft has documented it here.
  • Reply 2 of 2
    Thanks. I fixed it by enclosing everything in a div that was 600 wide, and then having all of the other elements take up 100% of it.
Sign In or Register to comment.