WEB CSS Crew - need help

Discussion in 'OT Technology' started by Javi, Nov 28, 2007.

  1. Javi

    Javi New Member

    Joined:
    Sep 13, 2004
    Messages:
    37,785
    Likes Received:
    0
    Location:
    Houston, TX
    Is there any way to have a DIV element to not inherit anything from a parent DIV?
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    You gotta override the parent attributes within the child elements.

    ie:
    Code:
    ul.example {
      font: bold 12px serif;
    }
    ul.example li {
      font: normal 12px serif;
    }
    
    All list (li) elements within ul.example would carry the attributes from ul.example, but I overrode it by creating a new style in the list element within parent class ul.example.
     
  3. Javi

    Javi New Member

    Joined:
    Sep 13, 2004
    Messages:
    37,785
    Likes Received:
    0
    Location:
    Houston, TX
    that sucks (for me). thanks, though :big grin:
     
  4. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    :werd:

    Modifying bad CSS can get frustrating. Good CSS from the start and it's never a problem.
     

Share This Page