4

If you use Firebug inspector, and hover #jimgMenu ul you will see that it has left padding but no css rule related to it:

http://www.alohatechsupport.net/examples/image-menu-1.html

Where is the left padding coming from? Why I can't see the origin?

EDIT:

If you click in Layout/Metrics it says that #jimgMenu ul has left padding = 40px;

But again I can't find where it that padding coming from.

alexchenco
  • 53,565
  • 76
  • 241
  • 413

3 Answers3

7

User agent stylesheet is being applied with the following padding (in chrome)

-webkit-padding-start: 40px;

thats why its always useful to use a css reset to remove all paddings and margins specific to each browser

http://meyerweb.com/eric/tools/css/reset/

daniel
  • 901
  • 1
  • 10
  • 21
2

an <ul>-Element has also an indent to be proof that its elements aren't displayed outside of the list

Unordered List (<ul>) default indent

You can set own padding for ul to overwrite this indent. <-- I tried this in firebug and it worked.

Community
  • 1
  • 1
lszrh
  • 1,531
  • 1
  • 19
  • 28
0

Have you tried using CSS reset?

http://www.cssreset.com/downloads/css-resets/eric-meyer-reset-css/eric-meyer-reset.css

Will reset all browser styles to 0 margin and padding.

Myles Gray
  • 8,711
  • 7
  • 48
  • 70