0

New to CSS. I tried to create a cascaded bullets. Turned out the style for li, ul were overwritten by some css file, I had to manually add style="list-style-type: disc;" to get back the bullet. However the following HTML code doesn't produce the nested bullets with identations.

    this is an example
    <ul>
        <li style="list-style-type: disc;"> this 1
            <ul>
                <li style="list-style-type: disc;"> this is 1.1</li>
                <li style="list-style-type: disc;"> this is 1.2</li>
            </ul>
        </li>

    </ul>

Here is what it looks on my browser

enter image description here

Any idea how to make the nested list with indentation by applying the right styles on the ul and li elements?

Thanks in advance.

2
  • it's ok for me jsbin.com/wodikate/1/edit... the problem is in some where else... would you add whole code? Commented Apr 2, 2014 at 2:31
  • works fine here. your other css code might overide it. Commented Apr 2, 2014 at 2:31

2 Answers 2

2

Check this example, I have made it very close to your case:

http://jsfiddle.net/MUNP9/

The idea is that some CSS in the page is overriding default padding-left of the nested ul. You can override it again.

Like:

ul ul {
    padding-left: 40px;
}

Also, you don't need to apply inline styles, just use CSS classes.

Sign up to request clarification or add additional context in comments.

1 Comment

Previous comment didn't seem to make it, here is it again. Thanks! It helped.
2

It seems like you have conflicting styles. You may want to try a CSS resetter. http://meyerweb.com/eric/tools/css/reset/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.