...

View Full Version : Why is there padding in my layout?



thefoxbox
05-18-2010, 02:59 AM
Hi everyone!

I have a question for you and I hope there's someone out there that can take a few seconds to look over some code on my web site... here is one example page:

[I've removed the URL so that search engines don't pick up my site and know that I had a question about CSS :o)]

It looks fine in: IE8, FF, Chrome, etc.

It looks BAD in IE7. I haven't tested it in IE6.

Can anyone tell me why padding still exists even though I thought I changed all padding to 0px?

Thank you!

Disclaimer: I know, I know... Tables are not the 'in' thing to use anymore when designing web sites, but I basically dropped a web designer and took over designing this web site myself (I haven't done web sites in over three years) and need to get it launched within one week so I didn't have time to learn all about DIVs... I will redesign it down the line but for now, I just have a table that needs some help, and if anyone can assist (I'm sure it's something simple), I will be endlessly grateful!

drhowarddrfine
05-18-2010, 03:18 AM
It looks fine in: IE8, FF, Chrome, etc.

It looks BAD in IE7. I haven't tested it in IE6. IE8 does not work like IE7 which doesn't work like IE6 and none of them work like the other far more modern browsers.


Can anyone tell me why padding still exists even though I thought I changed all padding to 0px?It's not padding but any of many other things, such as vertical alignment, justification, line-height and so on. I don't have IE available to look right now.


I didn't have time to learn all about DIVs
DIV is merely one of the HTML elements like all the others and not any special case having been around since HTML3.2.

thefoxbox
05-18-2010, 04:06 AM
Insightful response. Thanks for the info. I just started removing CSS until I figured out what broke it. I will definitely convert all of it to DIVs because this is not the way to code forever. Thanks again!

abduraooft
05-18-2010, 10:44 AM
I will definitely convert all of it to DIVs because this is not the way to code forever. No, as said above, <div> is just one of the html elements. Using <div>s all over your page may cause divitis (http://csscreator.com/divitis)! Your ultimate aim should be to make a semantic code (http://boagworld.com/technology/semantic-code-what-why-how).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum