Some older browsers, such as Netscape Navigator 4 and IE 4, have poor support for CSS. It is possible to hide styles from these browsers using specific media types and @import rules.
All styles will be hidden from Netscape Navigator 4 by changing the link element’s media type from screen to screen, projection. Netscape Navigator 4 does not support multiple media types.
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>CSS, How to hide content</title>
<link rel=”stylesheet” href=”style.css” type=”text/css” media=”screen, projection”>
</head>
<body>
</body>
</html>
The remaing styles will be hidden from IE 4 and several other older browsers by moving the <p> element rule set out of the original style sheet and into the imported style sheet. IE 4 can not read imported files.
//Code inside advanced.css
p {
font-family: arial, helvetica, sans-serif;
margin: 1em;
padding: 1em;
background-color: gray;
}
All modern browsers will read the multiple media type screen. projection. as well as the imported style, so they will display the fully styled <p> element.
Header styles can also be hidden from older browsers by enclosing the contents of the styled element inside a comment.
<!–
p {
font-family: arial, helvetica, sans-serif;
margin: 1em;
padding: 1em;
background-color: gray;
}
–>
</style>
Helpful Articles
Diabetic Renal Diet for CKD Patients Diet
Diabetic Renal Diet Guidelines Made Easy! Being that one of the most common extrarenal diseases affecting the kidney is diabetes mellitus, diabetic renal diet has become a topic of interest nowadays...
The Lemonade Diet
There are many people who have the primary goal of weight loss and they turn to the lemonade diet to lose weight quickly...
How Nutrition Affects Your Dog’s Behavior
A very important aspect in owning and taking care of a pet dog is providing the animal with good nutrition and proper nourishment...
Tags: class, combine, CSS, hide, How To, padding, style, Tutorials
It’s good to see this information in your post, i was looking the same but there was not any proper resource, thanx now i have the link which i was looking for my research. . . . . .