Having problems with the design of your page? Things working in one browser, but not another? It happens to all of us, and it can be pretty frustrating when it does.
The number one way to fix issues like this is simply this: validate your code.
As Mark Pilgrim pointed out back in May…
Newbie Designer posts a link to a test page, asking for help because it doesn’t behave as expected in this or that browser. Guru Designer replies, telling Newbie Designer that their page doesn’t validate, and that they should go validate their page before asking such questions. There is no further discussion; no further replies are posted; no one else is willing to help.
Why does this happen? Why won’t we help you?
The short, smart-alec, Zen-like answer is that we are helping you, you just don’t realize it yet. The full answer goes like this:
- Validation may reveal your problem.
- Validation may solve your problem.
- Valid markup is hard enough to debug already.
- Validation is an indicator of cluefulness.
There’s even a new version of the validator that gives more helpful error messages and tips to get them fixed, though it’s still in beta right now.
Bottom line: valid markup is a Good Thing™. Sure, it’s a bit of a pain, and it can take a little time to get used to the conventions involved in writing valid code. The amount of time, effort, and anguish involved in solving niggling little browser issues that valid code saves, though, is more than worth it.
(Oh, and in case you were curious — yes, this page validates!)
good advice. my blog works fine except in mozilla where it is an unvalidating nightmare.
really, i’ll fix it one day.