Example of a CSS layout with Dreamweaver

Source: Internet
Author: User
Tags dreamweaver

In CSS layout, the use of ul,li is very common. With Div and CSS, create no table layout.

In fact, Dreamweaver also has a sample of the CSS layout, as shown in the following figure:

The format of the Li code:

A). Use CSS to format A list character:

UL li{
List-style-type:none;
}

B). If you want to change the list character to an image, then:

UL li{
List-style-type:none;
List-style-image:url (images/icon.gif);
}

C). To align Left, you can use the following code:

ul{
List-style-type:none;
margin:0px;
}

D). If you want to add a background color to the list, you can use the following code:

ul{
List-style-type:none;
margin:0px;
}
UL li{
Background: #CCC;
}

E). If you want to add a mouseover background color effect to the list, you can use the following code:

ul{list-style-type:none; margin:0px;}
UL Li a{display:block; width:100% background: #ccc;}
UL Li a:hover{background: #999;}

Description: Display:block; this line must be added, so as to block the display!

F). The elements in Li are arranged horizontally, with key float:left:

ul{
List-style-type:none;
width:100%;
}
UL li{
width:80px;
Float:left;
}

Related Article

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.