1. External Reference
Left div
. Zhuce01 {
Font-family: "";
Font-size: 12px;
Color: # FF0000;
}
. Anniu {
Font-family: "";
Font-size: 18px;
Font-weight: bolder;
}
. Ziti {
Font-family: "";
Font-size: 12px;
Font-weight: normal;
}
2. jsp page
<Head>
<Link href = "css/zhuce01.css" rel = "stylesheet" type = "text/css">
</Head>
<Table width = "100%" height = "100%" border = "1" bordercolor = "# 5282CE" class = "ziti">
<Td class = "bk"> <p class = "dl"> </p>
Ii. Internal use
<Div style = "color: #00FF00"> content to be set </div>
Example 3: css
/* Page subject */
# Pagebody {
Width: 780px;/* set the width */
Margin: 0px auto;/* center */
}
# Mainleft {
Width: 192px;/* set the width */
Float: left;/* floating left */
Clear: left;/* float on the left is not allowed */
Overflow: hidden;/* Hide out of width */
Border: 1px solid #006699;
Margin: 5px auto;
Height: auto;
}
# Mainright {
Width: 580px;
Text-align: left;
Float: right;/* float to the right */
Clear: right;/* float on the right side is not allowed */
Overflow: hidden;
Border: 0px solid # E00;/* initial use table, retain use */
Margin: 5px auto;
}
# Mainright2 {
Width: 578px;
Float: right;/* float to the right */
Clear: right;/* float on the right side is not allowed */
Overflow: hidden;
Border: 0px solid #006699;
Margin: 2px auto;
Height: auto;
}
# Mainright3 {
Width: 285px;/* set the width */
Float: left;/* floating left */
Clear: left;/* float on the left is not allowed */
Overflow: hidden;/* Hide out of width */
Border: 1px solid #006699;
Margin: 2px auto;
Height: auto;
}
# Mainright4 {
Width: 285px;/* set the width */
Float: right;/* float left */
Clear: right;/* float on the left is not allowed */
Overflow: hidden;/* Hide out of width */
Border: 1px solid #006699;
Margin: 2px auto;
Height: auto;
}
/* Font setting */
# Biaoti {
Font-size: 10px;
Font-weight: bold;
Padding-left: 10px;
Color: # FFf;
Background-color: #006699;
Height: 20px;
}