I. Definition of CSS
There are many methods to define CSS-like expressions.
Method 1, in
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--> <Head runat = "server">
<Style type = "text/CSS">
Body
{
Font-family : Verdana, sans-serif ;
Font-size : Small ;
}
<Title> untitled faces </title>
</Head>
Method 2: Use style in <body>... </body> to define the CSS <TD style = "position: absolute" width = "100%">
Method 3: Save the edited CSS document as a ". CSS" file and define it in
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><LINK rel = stylesheet href = "CSS file">
Description:
"Rel = stylesheet" indicates that the connected element is a style sheet document. No need to change here.
Href='style.css 'specifies the CSS file.
The following is the primary generation: <Head runat = "server">
<LINK rel = "stylesheet" href = "style.css"/>
</Head>
Ii. Usage of class and ID
In CSS, define ID to start with "#"; define class to start.
The definition format is divided: Label. Class Name { Attribute : Attribute Value }
. Class Name { Attribute : Attribute Value }
The. Class Name specifies the label { Attribute : Attribute Value }
Specify tag # Class Name{Attribute:Attribute Value}
# Class Name{Attribute:Attribute Value}
# Specify a tag by Class Name{Attribute:Attribute Value}
The following is the primary generation: <Style type = "text/CSS">
# Navigation Li
{
Margin-left : 1px ;
Width : 120px ;
}
. My_sytle
{
Width : 120px ;
}
</Style>
Differences between class and ID:
The difference between class and ID is just ". "and" # ", their biggest difference is: the ID selector can only be used once on each page, it is unique, and the class can be used infinitely.