Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS div ID attribute question

    Okay.. let's say I have something like:

    #idname { font-family:tahoma; color:#FFF }
    #idname a:link { color:#000 }

    Am I required to put font-family in the second line as well, or would it apply it to both (which I want)?
    Binary Invisions
    Where the Webmasters Go.
    www.binvisions.com

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts
    all child elements inherit the settings from their parents. so yes, the font should apply to all elements within the parent.
    Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
    The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
    Pretty buttons does not a great website make.

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    What he said The only exceptions are occasionally you will have to redeclare font settings if you are styling a table within a div.

  • #4
    New Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah, I see. Thanks for clearing that up.
    Binary Invisions
    Where the Webmasters Go.
    www.binvisions.com


  •  

    Posting Permissions

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