Use the list of UL and Li to create form tips to share

Source: Internet
Author: User

float float using the list UL feature

It is necessary to say the principle of operation. For consistency, the table is made up of red parts, meaning that the other part of the cell is 0px, which eliminates the overlap of borders. Finally, the right and top borders are missing, defining a large div to fill. This completes a thin Line table with a 1px border. The specific style can be determined by defining the width of the cell.

Open the DW and create a new HTML. Insert the first line into the "Code" table source;


<li class= "a" >a</li>

<li class= "B" >b</li>

<li class= "C" >c</li>

<li class= "D" >d</li>

<li class= "E" >e</li>


Defines the CSS name effect for A,b,c,d, E.

The LI element is set up in CSS, with the first cell a as an example;

. a{




The same other b,c,d,e, the setting process is the same, the difference is the width. Example CSS settings are as follows;

. A,.b,.c,.d,.e{color: #999; font-size:12px;text-align:center;border-right:1px solid #f00; border-bottom:1px Solid # f00;height:22px;line-height:22px;} This is the general setting.

The following is the width setting

. a{width:30px;}

. b{width:60px;}

. c{width:40px;}

. d{width:40px;}

. e{width:360px;}


Cell float and float are set to <li>

Copy and paste the UL, set the CSS style of the UL, and clear float.

UL {margin:0px; padding:0px;



Design a large div; defined as h, CSS style is;

. h{height:85px;






Border-top-color: #0000FF;

Border-left-color: #FF0000;



For the sake of effect, the top border is set blue.


    • UL to set margin:0px; padding:0px, preferably handwritten in the source code.
    • Pay attention to calculating or debugging the width of the cell. Over small form variants.

Use the list of UL and Li to create form tips to share

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: 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.