CSS: blocks move to the right when ul, li, / li tags are enclosed

I use a combination of ul and li tags for the menu, and I use the display window and background color to display it as buttons, problems arise as soon as I add tags using li, the buttons seem to go to the right a bit like indentation or what something like that.

I tried

list-style: none;

but this does not work, can someone suggest a workaround.

Thank you for any help would be appreciated.

Thank you all for your efforts +1 for all the answers

+3
source share
4 answers

Set padding-leftand margin-leftto ulon 0.

+8
source

Do you reset to default and fill styles?

ul,li {
margin:0;
padding:0;
}
+3
source

UL LI . :

margin: 0;
padding: 5px;

UL , LI ( ).

Firefox ( Firebug), Chrome IE9 . , .

http://getfirebug.com/html

, , , :

http://www.w3.org/TR/CSS2/box.html

+2

A ul / li / . margin: 0; padding: 0 ul, li {}.

, CSS Reset, . : http://meyerweb.com/eric/tools/css/reset/

+1

All Articles