WordPress.org

Ready to get started?Download WordPress

Forums

Couple CSS questions (2 posts)

  1. jract7
    Member
    Posted 2 years ago #

    1. How does the order in the stylesheet effect the layout on the page?
    For instance:
    CSS #1:
    #widgetA
    #containerbg {background:#333;}
    #container {width:980px; margin:0px auto;}
    #widgetB

    CSS #2:
    #containerbg {background:#333;}
    #container {width:980px; margin:0px auto;
    #widgetA
    #widgetB

    With CSS #1 my containerbg appears correctly across the whole page; with CSS #2 it does not appear at all.
    My divs are as follows:

    <div id="containerbg">
    <div id="container">
    <div id="widgetA">
    </div>
    <div id="widgetB">
    </div>
    </div>
    <div>

    What gives? I guess there's some basic CSS concept I'm missing here?

    2. If a container or <div id="mycontainer"> </div>, has a z-index in its CSS #mycontainer { z-index:9999 }... will all relative objects within that container's scope also inherit the z-index value and stay above other objects?
    -The reason I ask is because I'm getting mixed results with certain objects. It might just be the way I have things setup... but I'm making the assumption that the above is how the parent and inherited children objects should work.

    Thanks!
    J

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    I'm sorry but it is beyond the scope of these forums to deal with pure CSS issues. Try a dedicated CSS resource such as http://www.css-discuss.org/ instead.

Topic Closed

This topic has been closed to new replies.

About this Topic