I have an unordered HTML list and am using CSS to style everything. When the text has multiple lines, it starts before the bullet point. Is there a way to make it start after the bullet point position?
Asked
Active
Viewed 1.5k times
6
-
Can you please post your HTML? – maple_shaft Apr 20 '11 at 11:55
4 Answers
13
You want to use list-style-position:outside
on your <ul>

Wesley Murch
- 101,186
- 37
- 194
- 228
-
in your example if i delete `list-style-position:outside` , then there is no effect on structure. – xkeshav Apr 20 '11 at 12:01
-
1Many thanks, I was actually using list-style-position: inside; because I wanted to indent all the bullet points. When I use the outside value I can't seem to apply margin-left/padding-left to the ul/li anymore. – Frank Vilea Apr 20 '11 at 12:02
-
Yes, it is usually the default. `inside` will do what appears in OP's example. – Wesley Murch Apr 20 '11 at 12:03
-
@Frank Vilea: Must be something else in your css, it's working fine [here](http://jsfiddle.net/Madmartigan/TdYvu/7/). Mess around with the fiddle if you need to see how float, display properties, etc. affect it. I can't really say what the issue is without seeing code. – Wesley Murch Apr 20 '11 at 12:12
-
Thanks, I simply had to apply float: left; which is what I forgot and why it did not work previously. – Frank Vilea Apr 20 '11 at 12:13
0
This is the most condensed CSS, using the shorthand property syntax:
ul {
list-style: disk outside;
}

Nathan Tuggy
- 2,237
- 27
- 30
- 38

Joansy
- 159
- 12
0
Sure, easy enough. Within your <li>
do this:
<li>
<div>Schnelles Importieren von Images As Planes</div>
</li>

Kon
- 27,113
- 11
- 60
- 86
-
Thanks Kon. I tried it but it seems to cause problems with Firefox. – Frank Vilea Apr 20 '11 at 12:04
-
Well, you'll have to make some styling adjustments probably (e.g. margin, padding, display inline?) – Kon Apr 20 '11 at 12:09
-
Firefox would start the text on a new line for some strange reason. It used to be pure text so I forgot to apply float: left; to the new bullet point list which was the reason why all these values would not work. – Frank Vilea Apr 20 '11 at 12:12
-
Adding divs is more of a last resort when css solutions are available. – Wesley Murch Apr 20 '11 at 12:13
-
@Madmartigan, I'd say that's argumentative. Depends on context of the problem. – Kon Apr 20 '11 at 12:21
-
1@Kon: CSS is for styling documents. HTML is for describing what they contain. Adding a meaningless div into a list item to achieve a visual effect that is easily possible with CSS to me has no advantage or purpose, but I'd be willing to listen to opposition. – Wesley Murch Apr 20 '11 at 12:26
-
No, you're right for the most part. I just wouldn't blindly apply CSS to everything without first considering if that's the appropriate solution for the problem at hand. – Kon Apr 20 '11 at 12:27