Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Please explain color inheritance

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31422
    chickentulip
    Member

    I am in the process of understanding the principles of floating and I was wondering if someone could have a look at the link below where I placed one html file with embedded css
    http://www.sevda.netii.net/week7/

    I floated content to the right , sidebar to the left, and footer is not floated.
    I do not understand why content which background-color is not indicated , and hence should be white, takes the background of the footer which is set to red. What is interesting is that if I clear footer, then content become white, or
    if I specifically indicate a background-color for the content then it becomes white also. I am not sure why the content takes the background-color of the footer when footer is not applied : clear: both. It is not a part of the div footer. They are independent divs.
    Is there a rational explanation for this?
    Thank you very much.

    #63354
    chickentulip
    Member

    Thank you. yes, I confused left with right in my first post.
    the question was not about clearing, but why content took the color from the footer when footer was not floated or cleared, that is what I have problem understanding.
    anyway, that you very much

    #63166
    chickentulip
    Member

    thank you very much for explaining so well.

    #63170
    Kralle
    Participant

    wolfcry911 that description was golden. Thanks a lot!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.