Previous Message
Next Message

Impossible nested list item problem

Sent by Ingo Chao on 23 June 2005 08:08


Scott Blanchard schrieb:
> ... However, I want each list item to indent properly, but at the same time, I
> want the element's background to span the entire width of the root UL
> element.
> http://v5.octane8.com/expandoTestListItems/default.aspx?id=7


Zero the default margins and paddings.

I wouldn't rely on the list markers (do you need them at all? If so, I 
would use bg-img instead).

Declare some padding on the <a>.

..sidebarContent ul {
  margin: 0 0 0.5em 0;
  padding: 0;
  list-style-type: none;
  }

..x8_expandoList li {
  margin: 0.25em 0 0.25em 0;
  padding: 0;
  }

..x8_expandoList li a {
  display: block;
  _zoom: 1;  /* or whatever you want to fix the whitespace bug */
  padding-left: 1em;
  background: transparent url(bullet.gif) 0 0 no-repeat;
  }

..x8_expandoList li li a {
  padding-left: 2em;
  background-position: 1em 0;
  }

..x8_expandoList li li li a{
  padding-left: 4em;
  background-position: 3em 0;
  }

..x8_expandoList li a:hover {
  background-color: rgb(166, 151, 108);
  }

Ingo
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message