CASCADING

NCD Style Sheet Guide v6.0

Sponsor's ADs:

+ Style Sheet Cascading

Cascading Order:    Inline > Embedding > Linking

samp.css:
	I {font-size: 30pt; Color:red}
HTML:
	<HEAD>
	<LINK REL="stylesheet" TYPE="text/css" HREF="samp.css">
	<STYLE TYPE="text/css">
	     I {Color:blue; text-decoration:underline}
	</STYLE>
	</HEAD>
	<BODY>
	<I STYLE="color:green">Today is fine.</I>
	</BODY>
Today is fine.


+ ID & CLASS Cascading

Cascading Order:    ID > CLASS

<HEAD>
<STYLE TYPE="text/css">
.code	{background:black; color:pink}
#id100	{font-weight:bold; color:yellow}
</STYLE>
</HEAD>
<BODY>
<P ID="id100" CLASS="code">Today is fine.</P>
</BODY>

Today is fine.



+ Important

{PROPERTY: VALUE!important}

The !important property used to override the default cascade.
<HEAD>
<STYLE TYPE="text/css">
.color	{background:black; color:aqua!important}
</STYLE>
</HEAD>
<BODY>
<P CLASS="code" STYLE="background:blue; color:yellow">
Today is fine.</P>
</BODY>

Today is fine.




Style Sheet Guide | HTML Design Guide
Basic | Selector | Cascading
Font | Text | List | Color & Background | Box | Table | Position & Format | Other|
Selector List | Property List


BACK TO NCD HOME
Network Communication Design - /
Copyright & Publishing 1994-2008 Network Communication Design