SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot get_dave's Avatar
    Join Date
    Nov 2006
    Location
    England, UK
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Overriding min-height rule

    Hi all,

    Just a quickie. I have a markup similar to the following:

    HTML Code:
    <ul> <!-- top level link items -->
       <li></li>
       <li></li>
       <li></li>
       <li></li>
       <li>
           <ul><!-- inside link items -->
               <li></li>
               <li></li>
               <li></li>
           </ul>
        </li>
       <li></li>
    </ul>
    Now I've made some CSS which floats each top-level link item against the other. Then the inside link items are displayed as per normal.

    Each top level link is CSS'd to be a box. I want them to look consistant so i added a min-height rule to the top level links. However, this is cascading down to the inside-links. How can i stop this cascade? What is the "return to default" setting for min-height?

    Any help would be great.

    Dave
    I'm looking for a link exchange.
    contact me or head to:
    http://www.aheadcreative.co.uk

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,350
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    There isn't a return to default setting for CSS (unfortunately) but if you want your nested lists to have no intrinsic height then just set the min-height to 0 and override your original settings.

    e.g.
    Code:
    ul li li{min-height:0}

  3. #3
    SitePoint Zealot get_dave's Avatar
    Join Date
    Nov 2006
    Location
    England, UK
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh of course. Dunno why i didn't think of that. Must be a Monday morning thing!

    Thanks for helping
    I'm looking for a link exchange.
    contact me or head to:
    http://www.aheadcreative.co.uk


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •