Opera 10- tilde selector hacks when the xml prolog precedes the doctype

Update: 17th Nov 2009. Targeting Opera 10 Alpha.

*~html - target Opera 8~10 - Also targets IE7 (IE6- and IE8 are not targeted).

*~html:root .test2 - target Opera 8~10

*:not(:root)~html .test3 - target Opera 8~10

*~html:not(:first-child) .test31 - Opera 8~10

*:not(:first-child)~html .test41 - Opera 8~10


<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en">
 

Please also see:

  1. IE7 targeting hacks working in Opera when the xml prolog precedes the doctype
  2. Selectors with comments targeting or filtering IE8 and Opera with xml prolog - Valid

CSS Class test