Kompx.com or Compmiscellanea.com


Aliosque subditos et thema


CSS. Target Opera only


CSS targeting Opera web browser only: This text is red in Opera HTML / XHTML. Code: <p>This text is red in Opera</p> CSS. Code: doesnotexist:-o-prefocus, p {color: #f00;} The -o-prefocus pseudo-class allows styling elements for Opera browser only. The code is placed in the common CSS file, not in a separate one as it is in case of Internet Explorer conditional comments. Source: http://www.opera.com/docs/specs/presto2.12/css/o-vendor/ [ 1 ] Opera 3.5 - 5.0 ignores "doesnotexist:-o-prefocus" and reads code as p {color: #f00;}. Opera 6.0 - 9.4 ignores the whole code starting "doesnotexist". [ 2 ] Internet Explorer 5.5+, Firefox 1.0+, Google Chrome, Safari 3.1+, SeaMonkey 1.0+, Netscape 7.2+, Mozilla 1.5+ ignore the whole code starting "doesnotexist". Older browsers like Internet Explorer before 5.5 or Netscape before 7.2 or Mozilla before 1.5 seem to ignore the uncommon, Opera 9.5+ specific code ("doesnotexist:-o-prefocus") and apply styles to what they understand - here it is the p tag; making the text in it red. [ 3 ] The text is red in Dillo 3.0.1 as well.

VBScript rollover. Image swap


VBScript rollover, using image swap. Two examples: several ways of applying VBScript in a web page. VBScript rollover Example 1 HTML / XHTML. Code: <a href="#" onmouseover="onMouse_over()" onmouseout="onMouse_out()"><img src="out.gif" id="rollover" alt="" /></a> VBScript. Code (<script> tag including): <script type="text/vbscript"> Sub onMouse_over() rollover.src='over.gif' End Sub Sub onMouse_out() rollover.src='out.gif' End Sub </script> Note: an external VBScript script file may also be used. The code itself is the same (without <script> tag pair, surely). The file is linked to page very much like a JavaScript file would be: <script type="text/vbscript" src="vbscript.vbs"></script> VBScript rollover Example 2 HTML / XHTML. Code: <a href="#"><img src="out.gif" id="rollover2" alt="" /></a> VBScript. Code (<script> tag including): <script type="text/vbscript" event="OnMouseOver" for="rollover2"> rollover.src='over.gif' </script> <script type="text/vbscript" event="OnMouseOut" for="rollover2"> rollover.src='out.gif' </script>