Couple CSS questions (2 posts)

  1. jract7
    Posted 4 years ago #

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

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

    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 id="widgetB">

    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.


  2. esmi
    Forum Moderator
    Posted 4 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