The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS li background inheritance problem Re: li background inheritance problem


Thanks, Robskiwarrior. Your suggestions almost get me there. The reason I wanted the background on the li element was because I wanted it to stretch the entire width of the containing div. When I change to what you suggested, it displays only the one line, which is good, but there is the 1em grey width on the left (from the 1em li padding).

What I realized was that I could add margin-left: -1em to the element, and it will pull it back to the left edge. That messes up the spacing on the arrow graphic, but unless there’s a way to bump just that over 1em, I’ll have to add the padding to the graphic itself.

Thanks for your help! Man, menus get me every time! ;)