HTML in the removal of the CSS in front of the small black dot, and the UL, Li Partial attribute method

Source: Internet
Author: User

For a lot of people use Div to do the site, always use, but in the display of the effect there will always be a small black spot, this makes a lot of people headache, but can not find the source, others we may use the following methods to clear.
1. Write code in CSS. Find the relevant CSS, write List-sytle:none under. Li and. UL; of course, some of them write list-style-type:none, which is especially common in some CMS.
2, find the Head section on the relevant page to write the following code
<style type= "Text/css" >
List-style:none;
</style>
3, add List-style within Li,ul. such as <ul style= "List-style-type:none><li><a herf=" http://blog.csdn.net/business122 "> My blog </a> </li></ul> Of course this is a lot of trouble.
The simplest is the first, through the CSS to control, of course, it will have a good effect.
These methods are set by setting List-style:none, some will use List-style-type, let's take a look at its properties.
None do not use bullets
Disc solid circle, default value
Circle Hollow Circle
Square Solid Square
Decimal Arabic Numerals
Lower-roman Lowercase Roman Numerals
Upper-roman Capital Roman Numerals
Lower-alpha lowercase English alphabet
Upper-alpha Capital English alphabet
These can be substituted for none above, and what you want will have a corresponding correspondence.

A). Using CSS formatting list characters: UL li{
List-style-type:none;
}
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);
}
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 in order to block the display!

F). The elements in Li are arranged horizontally, the key float:left:ul{
List-style-type:none;
width:100%;
}

HTML in the removal of the CSS in front of the small black dot, and the UL, Li Partial attribute method

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.