Vincent Pollard wrote:
> Hi everybody,
> 
> So my css and xhtml almost validate, except for two things:
> 
>  
> 
> 1)      The third line here validates in CSS3 but not in CSS2.1 - 
> 
> a) does that matter? 

Erik Vorhes has already stated that it doesn't matter.


> b) the overflow-y is the only way I've found to stop the page jumping
> around in IE8. Maybe somebody else has a better solution?
> 
> html { 
> 
>       /* forces scrollbar visible to prevent position jumping in Firefox
> */
> 
> height: 100%;     
> 
> margin-bottom: 1px;
> 
>       overflow-y: scroll /* forces scrollbar visible to prevent position
> jumping in IE8 */
> 
> }


We would need to see a test case here. It may be IE8 following CSS2.1 to 
  the letter or handling invalid XHTML differently. Get your XHTML valid.


> My style rules for IE6 using the underscore hack, e.g.: 
> 
> ..threeColLeft {
> 
>       _display: inline;
> }
> 
> I didn't really want to create a separate stylesheet for IE6 but maybe I
> should if I want validation. What would you do?


Replace the above with,


* html .threeColLeft {
   display: inline;
}


This is valid but should never select anything but IE6 or lower have an 
element outside the <html>. Chris Wilson of MS was the one who coded it 
in trident (IE rendering engine) in the 1990s.


> Any help,  advice, comments or suggestions - and please no abuse about
> using hacks in the first place - would be gratefully received.


Hack the older browsers by CSS that no browser should use. The above 
works in IE6. This one works in IE7.

*+html .threeColLeft {
   display: inline;
}


This bug or whatever is not present in IE8.

Never use unsupported selectors to target specific browsers. This one I 
used with Safari 3 to target it.

*:not(:root)~html #wrapper2+div[id*=""]:not(:first-child)>*


Now Safari 4 does not honor empty attribute substring selectors like 
it's cousin Firefox. All such hacks will eventually fail as browsers 
support of CSS improves or if other implementors change course.

The best way is to only hack IE7 or lower since all modern browsers 
(including IE8) should render a page the same way. I would not recommend 
hacking your HTML with IE Conditional comments since they are not in one 
location and thus not easily removed.


> P.S. what really are the advantages of being compliant? I hear it's
> better for SEO and I like the idea, just from a professional pride POV
> but why be compliant. Do a couple of underscore hacks pose a problem?


This has no affect with SEO (which is off-topic here). The underscore 
hack just invalidates the CSS.


-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to