CSSTemplates.NET
Cascading Style Sheet TemplatesFree CSS Templates
Sign up our Free Monthly Newsletter via this easy sign up form
to receive the latest CSS Templates of the Month as well as other useful CSS techniques to
spice up your website.
CSS White Hacks
In order to overcome the bugs in the browsers that have poor CSS support, web designers have to adapt several workarounds to make certain effects turn up the same across all the different browsers and operating system. These workarounds, are also known as Hacks.
Hiding Styles from Netscape Navigator 4.x
Netscape Navigator 4.x does not render some styles correctly. Therefore, the following methods are used to hide these styles from Netscape but still shows for other browsers.
Using the @import method, we can place styles that do not want Netscape to render. The following codes will display the basic.css in Netscape only while advance.css in other browsers.
In HTML file:
<link rel="stylesheet" type="text/css" media="all" title="Basic CSS" href="basic.css" />
<style type="text/css" media="all">
@import "advance.css";
</style>
Netscape also does not render codes between the /*/*/ and /* */ operators. The class, test, will be hidden from the Netscape.
In CSS file:
.proper{
font-size: 150%
}
/*/*/
.test{
font-size: 160%
}
/* */
.highlight{
font-style: italic;
}
Hiding Styles from Internet Explorer 5 on Macintosh
All codes between /* \*/ and /* */ will be hidden on a terminal running IE 5 and Mac. The class, test, will be hidden from the Netscape.
In CSS file:
.proper{
font-size: 150%
}
/* \*/
.test{
font-size: 160%
}
/* */
.highlight{
font-style: italic;
}
