Log in

View Full Version : . CSS Question



swathi
01-22-2008, 11:40 PM
divToolbarBox1 divToolbarBox2 divToolbar

first two areplaced in boxes and 3rd one encloses the two boxes

thetestingsite
01-23-2008, 12:04 AM
And? Is there a question you have?

swathi
01-23-2008, 12:12 AM
You have 3 div elements with id’s:
• divToolbar – Is a container element that will occupy the top of the page 800x25 px
• divToolbarBox1 – Is a small box inside a toolbar that will be aligned left and be 150x25 px
• divToolbarBox2 – Is a small box inside a toolbar that will appear right next to divToolbarBox1 and be 200x25 px

CSS for all three div elements so that they will align

TimFA
01-23-2008, 02:10 AM
div#divToolbar {
position: absolute;
top: 0px;
width: 800px;
height: 25px;
}

div#divToolbarBox1 {
float: left;
width: 150px;
height: 25px;
}

div#spacer {
float: left;
width: 450px;
height: 25px;
}

div#divToolbarBox2 {
float: left;
width: 200px;
height: 25px;
}


That should work just fine, remember to have it setup like:



<div id="divToolbar">
<div id="divToolbarBox1">
blah blah
</div>
<div id="spacer">
</div>
<div id="divToolbarBox2">
blah blah
</div>
</div>


Tim