Use CSS to replace a classic table instance

Source: Internet
Author: User

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml" lang = "gb2312">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> menus without tables </title>

<Style type = "text/CSS">
<! --
Body {font-size: 12px ;}
# Menu {
Margin: 15px 20px 0px 15px;/* defines the outer border distance of the layer */
Padding: 15px;/* defines the layer's internal border as 15px */
Background: # dfdfdf;/* defines the background color */
Color: #666;/* define the font color */
Border: # fff 2px solid;/* defines the border as a 2px white line */
Width: 160px;/* defines the content width as 160px */
}
# Menu ul {
Margin: 0px;
Padding: 0px;
Border: Medium none;/* Do Not Display Borders */
Line-Height: normal;
List-style-type: None}
# Menu Li {border-top: # fff 1px solid; margin: 0px ;}
# Menu Li {
Padding: 5px 0px 5px 15px;
Display: block;
Font-weight: bold;
Background: URL (http://www.w3cn.org/images/icon_dot_lmenu.gif) Transparent no-repeat 2px 8px;
Width: 100%;
Color: #444;
Text-Decoration: none;
}
# Menu Li A: hover {Background: URL (http://www.w3cn.org/images/icon_dot_lmenu2.gif) # c61c6 no-repeat 2px 8px;
Color: # FFF ;}
-->
</Style>
</Head>

<Body>
<Div id = "menu">
<Ul>
<Li> <a Title = "website standard" href = "http://www.w3cn.org/webstandards.html"> what is website Standard </a> </LI>
<Li> <a Title = "standard benefits" href = "http://www.w3cn.org/benefits.html"> use standard benefits </a> </LI>
<Li> <a Title = "How to transition" href = "http://www.w3cn.org/howto.html"> How to transition </a> </LI>
<Li> <a Title = "related tutorials" href = "http://www.w3cn.org/tutorial.html"> related tutorials </a> </LI>
<Li> <a Title = "tool" href = "http://www.w3cn.org/tools.html"> tool </a> </LI>
<Li> <a Title = "Resources and links" href = "http://www.w3cn.org/resources.html"> resources and Links </a> </LI>
</Ul>
</Div>
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.