CSS: How do i make a .div go behind all the other .div's for a background?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ryaby21
    New Member
    • May 2007
    • 5

    CSS: How do i make a .div go behind all the other .div's for a background?

    Please help! i have everything set up with my CSS HTML layout and its all good. im using 3 divs at the moment and what i want to to do now is to add a new div with a background for the page. My problem is i don't know how to make it go behind all the other divs. can anyone help?

    These are the .div's i have created and .div3 is the .div i have been using to try and become the background

    .div0 {
    background-color:black; color: purple;
    border:4px solid; border-color: Purple;
    width:106px; height:300px; overflow:auto;
    position:absolu te; z-index:2; left:50%; top:0%;
    margin-left:-400px; margin-top:635px; text-align:center;
    visibility:visi ble;}

    .div1 {
    background-color:black; color: purple;
    border:4px solid; border-color: Purple;
    width:670px; height:300px; overflow:auto;
    position:absolu te; z-index:2; left:50%; top:0%;
    margin-left:-270px; margin-top:635px; text-align:center;
    visibility:visi ble;}

    .div2 {
    background-color:black; color: purple;
    border:4px solid; border-color: Purple;
    width:250px; height:460px; overflow:auto;
    position:absolu te; z-index:2; left:50%; top:0%;
    margin-left:150px; margin-top:150px; text-align:center;
    visibility:visi ble;}
    marquee { z-index:8; }
    table div, span, td td td, table div div { visibility:hidd en !important; }
    .bbzContainer div, .bbzContainer div font, .bbzContainer div a, .bbzContainer div div, .bbzContainer font a, .bbzContainer span, .bbzContainer div table a, .bbzContainer div table img, .bbzContainer div table font, .bbzContainer div table, .bbzContainer div table td, .comt, .comt td, .comt span, .comt a, .comt div {visibility:vis ible !important;}

    .bbzDiv {content:"Overl ay Generator beta";}

    .div3 {
    background-color:black; color: purple;
    border:4px solid; border-color: Purple;
    width:820x; height:505px; overflow:auto;
    position:absolu te; z-index:2; left:50%; top:0%;
    margin-left:-410px; margin-top:140px; text-align:center;
    visibility:visi ble;}
  • Christopera
    New Member
    • Feb 2007
    • 70

    #2
    I would tend to believe that the most correct solution would be html side.

    example:
    <div id="background" >
    <div id="1">
    <div id="2">
    </div>
    </div>
    </div>

    Comment

    • Ryaby21
      New Member
      • May 2007
      • 5

      #3
      I did that and now the image is hanging at the bottom of the page and not where i want it to be i used <style> to set where the margins are but didnt work! :S

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Can't you use the body?
        In css:
        body{background-image:url("your _image.png")}

        Comment

        • Christopera
          New Member
          • Feb 2007
          • 70

          #5
          That would be an even better fix.

          Comment

          • Ryaby21
            New Member
            • May 2007
            • 5

            #6
            ye i was just trying to make if fancy :/ is ther anyway to put borders around images done in body?

            Comment

            • drhowarddrfine
              Recognized Expert Expert
              • Sep 2006
              • 7434

              #7
              You can still use a div if you want to. Just wrap all that in a div and give it an 'id'. I used the name 'test'. Then, in CSS:
              Code:
              html,body{height:100%}
              #test{
              background-image:url("your_image.png");
              height:100%;
              	}
              EDIT: Yes, you can add a border to the body tag.

              Comment

              • Ryaby21
                New Member
                • May 2007
                • 5

                #8
                thankyou all for all the help you given me i got it going now :) o and sorry for being such a noob!

                Comment

                Working...