Dreamweaver CSS page layouts ul and Li examples

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:

  1. The format of the Li code:
    A). Using CSS to format list characters: UL li{
    List-style-type:none;
    For example, the following:
    • Supply and demand information

    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);
    For example, the following:
    • Supply and demand information

    C). To align Left, you can use the following code: ul{
    List-style-type:none;
    margin:0px;
    For example, the following:
    • Supply and demand information

    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;
    For example, the following:
    • Supply and demand information

    E). If you want to add 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!

    For example, the following:
    • Supply and demand information

    F). The elements in Li are arranged horizontally, the 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.