What CSS attribute, if any, would control this?

I have the following list:

alt text http://img210.imageshack.us/img210/2912/12922833.jpg

How can I get the text of the fourth element to wrap, but the padding is the same level as the rest of the list? Is there any CSS attribute that controls this?

+1


a source to share


4 answers


try list-style-position

:

li {
  list-style-position: outside;
}

      



As the ricebowl sticks around , you may need to increase the left margin or padding to make the bullet points "abandoned" because instead of the bullet the points are on the inside <li>

, they are now on the outside.

+5


a source


If this is a real list, this should be the default, but do as Henrik says.

If it's not a real list, and you just paste the bullet in there ... then ... Well, it's a little more complicated. You should ideally use the correct list ( <ul><li>list item</li></ul>

)



If this is a bullet image, you can use padding and absolute positioning. If it's the HTML character for a bullet, you're packed.

0


a source


Not sure what you are asking, I am assuming you want it to look like you have it above. Because by default it shouldn't look like this.

the below code example will make it look like your image:

<style type="text/css">
    ul {
        width: 200px;
        padding: 0px;
        margin: 0px;
    }
    ul li {
        padding-left: 5px;
        text-indent: 20px;
    }
</style>

<ul>
    <li>text</li>
    <li>text text text text text text text text text text text text text text text text text text </li>
    <li>text </li>
</ul>

      

and this code will look like you ask:

<style type="text/css">
    ul {
        width: 200px;
    }
</style>

<ul>
    <li>text</li>
    <li>text text text text text text text text text text text text text text text text text text </li>
    <li>text</li>
</ul>

      

0


a source


 ul li { padding-left: 25px; }

      

-1


a source







All Articles