What are the Dreamweaver CSS page layout ul and li examples?
This article mainly shows you "Dreamweaver CSS web page layout ul and li example is how", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "Dreamweaver CSS web page layout ul and li example is how" this article bar.
The use of ul,li is very common in CSS layouts. Work with DIV and CSS to create table-free layouts.
In fact, Dreamweaver also has its own CSS layout example, as shown below:
LI code formatting:
A). Use CSS to format list symbols:
ul li{
list-style-type:none;
}
For example, the following:
for sale
B). If you want to replace the list symbol with an image, then:
ul li{
list-style-type:none;
list-style-image: url(images/icon.gif);
}
For example, the following:
for sale
C). For left alignment, you can use the following code:
ul{
list-style-type:none;
margin:0px;
}
For example, the following:
for sale
D). If you want to add background color to the list, you can use the following code:
ul{
list-style-type: none;
margin:0px;
}
ul li{
background:#CCC;
}
For example, the following:
for sale
E). If you want to add MOUSEOVER background color 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 that block display!
For example, the following:
for sale
F). Horizontal arrangement of elements in LI, key FLOAT:LEFT:
ul{
list-style-type:none;
width:100%;
}
ul li{
width:80px;
float:left;
}
The above is "Dreamweaver CSS web page layout ul and li example is how to" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!