Problem solving when the list icon is not displayed when using List-style-position:outside in CSS

Source: Internet
Author: User
Today when modifying a Web site style, encountered a problem, no matter how to adjust the CSS properties, an article List icon has not been displayed, and finally changed the list-style-position:outside to List-style-position:inside, The list icon is displayed. In order to find out why the list-style-position:outside does not show, and constantly try to delete the various CSS properties to find out the cause of the outside does not appear, the result has not been found to a definite answer, but certainly, the ul li attribute width : 100%, padding:0; will have a certain effect on the list icon does not display, if you encounter this problem, please note these two properties.

The css2.0 manual explains these two parameters, outside and inside:

List-style-position:outside | Inside

Value:

Outside: Default value. List item markers are placed outside the text, and wrapping text is not aligned with the tag

Inside: List item markers are placed within text, and wrapping text is aligned according to the tag

From the above definition can be seen padding still have influence, but I here specifically where out of the problem but have been unable to find out, remove except width:100% or padding:0 other styles, can achieve the effect of the display.

The question is so over, because of the style need, I take the list-style-type decimal Arabic numeral This value, when in order to satisfy the list row exceeds the line when the demand, the following three parameters are used:

Overflow:hidden;white-space:nowrap;text-overflow:ellipsis;

However, the list of discoveries is not shown in Arabic numerals, and it becomes the number 1. When the Overflow:hidden deleted, the problem solved, but the ellipsis does not come out, and then learned a hack, after the attention.

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.