Hide CSS from Opera





4
Date Submitted Sun. Aug. 13th, 2006 4:52 PM
Revision 1 of 1
Helper snowdonkey
Tags "css" | "Opera" | "stylesheets"
Comments 2 comments
Hide CSS styles from Opera by substituting Latin letter "r" for Unicode character 82 in the media attribute "screen" of the style tag.

Tested in browsers based on Netscape, Mozilla, and Internet Explorer for PC.

<html>
<head>

<!-- Styles for Opera and other browsers -->
<style type="text/css" media="screen">
body
{
        color: red;
        font-size: x-large;
        font-weight: bold;
}
</style>
       
<!-- Styles for browsers besides Opera -->
<style type="text/css" media="sc&#82een">
body
{
        color: blue;
}
</style>

</head>

<body>
<p>This paragraph will be red in Opera.  It will be blue in Netscape, Mozilla and Internet Explorer 5.0+ for PC (including version 7).</p> 
</body>
</html>
 

Bennett Joseph

Comments

Comments BTW, Snippet Validates
Mon. Sep. 11th, 2006 8:01 AM    Helper snowdonkey
Comments nice
Fri. Aug. 18th, 2006 6:36 AM    Syntax Master sundaramkumar

Voting