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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    attribute inheritance

    Hello, I am relatively new to Web design, and I have a question.

    Where can I find what attributes are not inherited from parent to child? For instance, when applying a style to the <body> tag, the <h#> tags will inherit mostly everything but size. Why is this, and what determines it? I would like to know wherelse this applies.

    Thank you in advance for any help.

    endy

  • #2
    Daf
    Daf is offline
    Regular Coder
    Join Date
    Feb 2005
    Location
    East Texas
    Posts
    134
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Good question - I would like to know as well so...

    I found these links by searching on google with the keywords "css inherit"

    http://www.creativepro.com/story/feature/14776.html
    http://www.blooberry.com/indexdot/cs...cs/inherit.htm
    http://msdn.microsoft.com/workshop/a...nk_ovw_css.asp (IE specific)
    http://www.library.utoronto.ca/HTMLc...ets/prop1.html

    These are but a few of the many hits I got with that search.

    Thanks for asking this as I have bookmarked these myself.

    Daf

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I think the general answer is that default browser settings are nothing more than built-in stylesheets (in a way). So the usual rules of specificity apply.

    As far as I know, hx elements are controlled by percentage, not specific pixels, so if the font-size set in body was, say 10px, a h2 element would be smaller than if the font-size in the body was set to 12px.

    The same goes for uls and lis-- the font sizes displayed are relative to the size set in the body. Don't forget tables and tds, whose fonts need to be redeclared completely in IE.

    Those are the general rules I'm aware of... looking through some of those links above might help to get a deeper understanding.

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the quick response guys. I looked into the links and it makes much more sense now.

    endy

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check the specs

    The W3C candidate recommendation for CSS 2.1 features a list of all properties; it also tells which properties are inherited and which are not (column 5, "Inherited?").
    Regards,
    Ronald.
    ronaldvanderwijden.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
    •