css padding an image inside a listitem (navigation bar) -


i have image displayed every listitem on navigation bar, problem cannot use padding left 10px, browser think listitems need padding left instead of background-image.

is there way can substract background-image property #menu li selector, without affecting other background-image properties on page?

#menu li a{     display:block;     font-family:tahoma, geneva, sans-serif;     font-size:12px;      color:#ffffff;      text-decoration:none;      background-color: #376596;      padding-top:2px;     padding-left: 20px;     padding-bottom: 2px;       background-image:url('http://images.subeta.net/smilies/6398_emoticon_smile.gif');     background-repeat:no-repeat; } 

you can watch full code here

i've been looking on web solution, english isn't sufficient enough search problem because dont know words/terms should ask i'm still rookie.

just try background-position.

menu li a{ background-position:10px 0px; } 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

How to call a javascript function after the page loads with a chrome extension? -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -