David Newton wrote:The best place to start is with a reset CSS (I've used Yahoo's, but there are many others) and build the rest of the CSS up from that.
There are lots of IE workarounds (especially IE6, at least in my experience). I try to let other people solve those types of problems--and the web is full of people who have.
This is a great place to start! It puts all of the browsers on an even playing field.
Anyway, if you're still experiencing some IE issues with how things are laid out from one browser to another, a great place to check for known bugs and fixes for IE is
Position Is Everything.
One thing that I've noticed can get a lot of developers in trouble is floats. Floats are awesome for layout, if used and closed correctly. If not, they can be a nightmare if you're not familiar with them.
Of particular note is the padding + float bug in IE. For example:
You have set a global style for paragraphs that states "padding-left: 40px;", and everything is fine in IE and FF. Then you have a paragraph that you need to add "float: left;" to. You do that, and in FF it looks great, but in IE it has 80px of left padding, instead of the 40px that you defined.
This is because IE always doubles the left padding on elements that are floated left. To fix it, just add: "display: inline;" to the style for that particular paragraph (not to the global style). This fix does not adversely effect any other browsers while fixing the issue in IE.
Another way to avoid browser issues for your overall layout is to keep in mind that if something has a defined width, do not add left or right padding to it. The same goes for height and top or bottom padding. You'll find that if you define a width of 100px to an element, and then give it this: "padding: 0px 25px 0px 25px;", that it will actually take up 150px, instead of 100px. This is true in all browsers that I am aware of.