Question: I heard that as long as a page validates, it will always display correctly across browsers. I find that hard to believe because I know padding, for example, is dealt with differently by different browsers. So even if a page validates correctly, one browser might not show it correctly? 

A basic example is padding. Doesn't IE6 deal with padding differently and therefore is the reason for specific stylesheets for Internet Explorer? And if so, is there any way to be 100% sure that a site will look the same across all browsers?

**UPDATE**

I'm fairly sure that it can't be gaurenteed 100%. But is there one example that I can use to prove this? AS I mentioned, I think padding is dealt with differently, but how?

Answer: 
No it doesn't mean that your website will look the same across all browsers, all it means is that you have adhered to the standards. And that **if** - and only **if** - all browsers implement all the standards exactly according to the standards, that your site will then look exactly the same across all browsers. The reality is that not all browsers have always adhered perfectly to all the standards. Therefore, it does not mean that your site will look the same in all browsers. 

Newer version of browsers have adhered more and more to the standards, so they're on the right track, but especially older versions of browsers, and to be even more specific, Microsoft's older versions of browsers, have not really adhered to the standards.
Validation and cross browser compatibility are 2 completely separate things. 
Today, since there is no more IE6 and mostly no IE7 most browsers already behave similar.

IE6 and 7 can decide to collapse padding with margin in a couple of scenarios.

There are over 20 combinations of hasLayout margin padding and child parent which cause IE7 to collapse paddings, which it never should.

There are tricks, but validating HTML is certainly not one of them.

What you probably mean is the Quirksmode.

IE in quirksmode has the oldschool box model, which calculates real width = defined width, inkl padding and border. Standart behaviour would be real width = defined width + padding + border.

So if you use the correct doctype, IE 6 and 7 will add paddings to the width, if you dont use doctype, IE6 and 7 will behave like IE5 with the old school box model.

However, you only need to declare the doctype, it doesnt need to validate.

**Proof that validation doesn't help:**

```
<div style="float:left; margin-right:5px;">Double margin bug example in IE 6</div>
<div style="float:left;">Double margin bug example in IE 6</div>

```

This code is perfectly legal and will validate, however it will trigger IE6's infamous double margin bug and look differently across browsers.

There are thousands of other examples, just like this one (i am actually not joking)