473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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:absolute; z-index:2; left:50%; top:0%;
margin-left:-400px; margin-top:635px; text-align:center;
visibility:visible;}

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

.div2 {
background-color:black; color: purple;
border:4px solid; border-color: Purple;
width:250px; height:460px; overflow:auto;
position:absolute; z-index:2; left:50%; top:0%;
margin-left:150px; margin-top:150px; text-align:center;
visibility:visible;}
marquee { z-index:8; }
table div, span, td td td, table div div { visibility:hidden !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:visible !important;}

.bbzDiv {content:"Overlay Generator beta";}

.div3 {
background-color:black; color: purple;
border:4px solid; border-color: Purple;
width:820x; height:505px; overflow:auto;
position:absolute; z-index:2; left:50%; top:0%;
margin-left:-410px; margin-top:140px; text-align:center;
visibility:visible;}
May 3 '07 #1
7 7352
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>
May 3 '07 #2
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
May 4 '07 #3
drhowarddrfine
7,435 Expert 4TB
Can't you use the body?
In css:
body{background-image:url("your_image.png")}
May 4 '07 #4
That would be an even better fix.
May 4 '07 #5
ye i was just trying to make if fancy :/ is ther anyway to put borders around images done in body?
May 4 '07 #6
drhowarddrfine
7,435 Expert 4TB
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:
Expand|Select|Wrap|Line Numbers
  1. html,body{height:100%}
  2. #test{
  3. background-image:url("your_image.png");
  4. height:100%;
  5.     }
EDIT: Yes, you can add a border to the body tag.
May 4 '07 #7
thankyou all for all the help you given me i got it going now :) o and sorry for being such a noob!
May 4 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Shannon | last post by:
Hi there, I have an HTML page with one large background image in the left corner. I've got various links positioned randomly on the image, and I use <span> tags to display text on another...
0
by: Charles Blaquière | last post by:
While noodling around, looking for a good layout for an "events calendar" page, I came upon a problem that has me stymied. Have a look at http://kpuc.org/events/upcoming-2.html . The basic...
3
by: Gnolen | last post by:
Hi, I am wondering if someone could guide me in the right direction about this. How can I make div 'one' hover? Does not need to be clickable/link...It would be easy if the images was not...
7
by: Dario de Judicibus | last post by:
System: Windows XP SP1 + all latest patches (no SP2) Browser: IE 6.0.2800.1106.xpsp2.040919-1003 Problem: browser does not show, or partially shows, borders and background color of <DIV> as...
9
by: glin | last post by:
Hi Guys, I am having problem finding the position of a button that I can set the div position next to the button. Can you please help? Thanks in advance.
1
by: Doug | last post by:
I have a table with equal size cells, then i have div tags in each cell. The div tags have a border and a background, basically to make the contents look a little better. The problem is each div...
7
by: arupfrancis | last post by:
Hi, I am trying to create a colored box using background images. I am able to do it easily using tables but doing it in divs is proving to be an issue. Moreover IE and Mozilla also seems to be...
1
by: pbd22 | last post by:
Hi all. I am using styles to lock down the GUI until the user enters some info in a CSS/DIV pop box. If the user does now scroll before he clicks, the pop box is centered and the background...
10
by: crazeway | last post by:
The top margin of a nested div (#main) is pulling down its containing div (#middle) along with the 2 floated divs flanking it. This problem corrects itself and gives me the desired effect if I add a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.