Home › Forums › CSS › css div tags posistioning › Re: css div tags posistioning
May 18, 2012 at 1:53 am
#103017
jasemilly1
Member
Realised I had a closing div tag in the wrong place!!!
but that makes me ask another question, if you have an couple of id’s set up as posistion realitive. Inside a container div set to absoulete. In your html does it matter what order the divs are inside the container div??
if I change the order it makes a dramatic effect on the appearence even though they have position values in the css
here control is before a1_1 and a1_2 and they appear at the bottom of the page, if I move control to after these to divs everything appears within the container???
here is the css
#container
{
/*background-image: url(images/graphics/background.jpg);*/
width: 100%;
height: 100%;
position: absolute;
background-color: purple;
}
#floorplan{
top: 0%;
background-image: url(images/graphics/floorplan.gif);
width: 80%;
height: 100%;
left: 15%;
background-repeat: no-repeat;
background-position: right top;
position: relative;
/* background-color: lime;*/
}
#control{
position: relative;
top:0%;
left:0%;
width:4%;
height:80%;
background-color: teal;
padding-left: 4%;
padding-top: 1%;
}
#cq {position: relative;
top:20%;
left:20%;
width:10%;
height:10%;
background-color:green;
padding-left: 4%;
padding-top: 1%;}
/*.off{background-image:url(images/icons/lightbulboff.png);}*/
/* this section is all the bulbs a1 is the group and _1 is the indvidual bulb */
/* a1 is the table lights*/
#a1_1{width: 2%;
height: 2%;
top: 0%;
left: 20%;
position: relative;
background-repeat: no-repeat;
background-color: blue ;
}
#a1_2{width: 2%;
height: 2%;
top: 10%;
left: 30%;
position: relative;
background-repeat: no-repeat;
background-color: blue ;
}
why is this what have I got wrong?
thanks for any thoughts.