html-lists

list-style outside isn't displayed but inside is

◇◆丶佛笑我妖孽 提交于 2019-12-13 01:19:36
问题 The black discs before content inside the "li" are visible with this css: li{ list-style: disc inside none; } But they don't show up with this code: li{ list-style: disc outside none; } How can I make them visible ? 回答1: Set the padding-left attribute of the parent "ul" to something like: "20px", and they will show up. 来源: https://stackoverflow.com/questions/14439478/list-style-outside-isnt-displayed-but-inside-is

List bullets not displaying correctly in Internet Explorer

孤者浪人 提交于 2019-12-12 19:21:48
问题 I have an <ol> with some <li> 's in it, in FF it looks good, but for some reason in IE it looks like this: HTML: <ol start="1"> <li>Free gifts click here</li> <li>Free gifts click here</li> <li>Bonus gifts</li> </ol> CSS: ol { list-style: none outside none; } li { list-style: decimal outside none; margin-left: 30px; margin-bottom: 12px; } Any idea? Thanks, 回答1: hasLayout is involved here somewhere it's the cause of <ol> 's not numbering correctly as well as a few other lists oddities, you

CSS gap between list items in IE7

孤人 提交于 2019-12-12 19:19:17
问题 I'm unable to remove the gap between the list items in IE7. HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="base.css" /> </head> <body> <ul> <li> <div>row 1.1</div> <div>row 1.2</div> </li> <li> <div>row 2.1</div> <div>row 2.2</div> </li> <li> <div>row 3.1</div> <div>row 3.2</div> </li> </ul> </body> </html> CSS: ul { padding: 0px; margin: 0px; } li { list-style-type:

Start a list from a certain number

冷暖自知 提交于 2019-12-12 19:18:52
问题 What's the best way to get a ol to start from 'x'? The start tag is deprecated and everything I have found on Google has used the :before pseudo class which doesn't work in IE6 or 7. Didn't have much luck when searching stack either. Only thing I can think of is manually go through and number the lists myself and style accordingly? Any help appreciated. 回答1: While the start attribute in HTML 4 is indeed deprecated, looking at the HTML 5 docs, I see: The start attribute, if present, must be a

Alphabetically Order HTML List with Headers

…衆ロ難τιáo~ 提交于 2019-12-12 18:18:51
问题 I am looking to Alphabetically order an HTML list, but after each letter, there would be a <hr /> tag and a header, indicating the new letter list. To revise if I wasn't clear enough, I have my list... <ul> <li><a href="#/"> john-smith/</a></li> <li><a href="#/"> joe-smith/</a></li> <li><a href="#/"> glen-smith/</a></li> <li><a href="#/"> daniel-smith/</a></li> <li><a href="#/"> johnny-smith/</a></li> </ul> And now, I wanted to have some JS code that would organise this list alphabetically,

align list items to top of ul container

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 17:12:13
问题 The li tag in my ul doesn't start from top. Instead it starts from the bottom. I want to have all the images starting from top and all the labels of those images should start 10px below images. Important: images and text should be center-aligned within li. Final output should be something like below image even when labels are bigger: Any help is highly appreciated. Code goes here: https://jsfiddle.net/srshah23/suctrnuq/ .cul { list-style-type: none; width: 100%; padding: 0; margin: 0px auto 0

Multi-column lists in Bootstrap/Foundation

梦想与她 提交于 2019-12-12 16:23:42
问题 I am trying to figure out the best way to create vertical multi-column lists in a grid framework like Bootstrap or Foundation. I already know how to do this in a couple of ways, but the way I want it I am not sure is possible to do with just CSS. I need the li tags to come directly after the ul tag without a col-*-* divs between. To best describe what I want, I'll first show most people would roughly go about a 3 column list: <ul class="row"> <li class="col-sm-4">A</li> <li class="col-sm-4">B

Android WebView loading blank when viewing html nested lists

不羁的心 提交于 2019-12-12 12:13:50
问题 I'm trying to load a reasonably sized html nested list into a WebView using Android. The problem is that when I try to load the html, it appears to be blank. Now I've tried this a couple of different ways. I firstly tried the code within the W3Schools "Try It Yourself" box - W3Schools. From here, once I get to a certain size, it displays an error. So from the code below, if you get rid of the last few Headings, it displays fine up until a particular size. I've put the html code into a local

How to center text in li?

余生长醉 提交于 2019-12-12 12:12:20
问题 I am trying to have equal spacing between four different li elements, but I end up with this: HTML: <ul><li>Inbox</li></li><li>Drafts</li></li><li>Sent</li></li><li>Trash</li></ul> CSS: ul li { width: 25%; display: inline-block; text-align: center; } I have tested the CSS and it is working as it should. I think the problem is that the li 's don't all have the same amount of letters, so you end up with some weird visual effects. My reason for believing this: (Equal spacing) 回答1: My approach

Randomize a unordered list [duplicate]

青春壹個敷衍的年華 提交于 2019-12-12 10:17:09
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: javascript - shuffle HTML list element order After a little bit of help. After something quite simple, but can't seem to find a way of doing it myself. I've got a dynamic unordered list being generated from some back end code, (not under my control). The list can be anything from 9 tags up to 100+. They are returned in an order, as defined by the backend code. Using jQuery/javascript I would like to be able to