How to enable auto indentation in lists and list items?


Tags: css

Problem :

I am new to CSS, I took over someone's CSS code which has:

.. CSS Reset .. ul, ol, li .. {
   ..
   margin: 0;
   padding: 0;
   ..
}

However, setting padding to 0 effectively disables automatic list item indentation, but I want indentation, so I wrote:

<ul style="padding: 10;">
    <li style="padding: 10;">
        <ul style="padding: 10;">
            <li  style="padding: 10;">123</li>
        </ul>
    </li>
</ul>

padding: 10 does not have any effect, browser still displays no padding, thus no indentation.

How do I get auto indentation back in place?



Solution :

Friend, it is 10px not 10 for the padding value.

 <li  style="padding: 10;">123</li>

should be

 <li  style="padding: 10px;">123</li>

Cheers,


    CSS Howto..

    How to make css transition effect apply to all its children?

    How to customize the size of JCoverFlip?

    How to create a progress dialog when switching the webpages?

    How to generate the following control using html and css

    How do I keep my exiting CSS from compiled LESS

    How to keep text in the middle of the screen even when re-sizing page in html/css

    How do I make a div take the remaining height of a parent?

    How can I align a group text with seperate Widgets

    How to clear the bottom of an image like clear left / right

    jquery hide/show list elements from ul

    How to remove class using CSS

    CSS: How to move contents of one div into another one

    How to Get Fixed Children to Play Nicely with their Parents

    How to edit the CSS of a div that does not contain a H1 tag?

    how to position a div for all screen resolutions

    How to set caption for youtube videos box in css?

    how to apply ellipse effect in which contain space in string?

    How to set dynamic responsive divs with only CSS (no javascript)?

    Dropdown list doesn't show up, what am i doing wrong

    How to give all divs same amount of space on each side

    How does the following line of JavaScript work?

    how to transform in both X & Y direction with CSS Only [duplicate]

    Twitter Bootstrap - how to add some more margin between tooltip popup and element

    How to change the Size of the ListBox of the datePicker in GWT?

    How to keep width of the main container to maximum width in a 3 column fluid layout?

    How to modify one element of a class without bothering the rest with the same CSS class?

    How to prevent HTML element moving when resizing window?

    How to get custom css to load after richfaces?

    How to style an iframe?

    Overlay image to show like panorama [closed]