PizzaEater
04-21-2008, 07:48 PM
OK - after hours and hours of google searching, forum searching, talking with my
designer friend, and tinkering with my CSS, I have to ask these questions
because nothing works!
I have a simple layout. A container div and inside of it 4 wrapper divs floated
left. Here's the code:
<div id="wrapper">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
</div>
<style type="text/css">
#wrapper{
padding-left:5px;
width:100%;
height:100%;
}
#wrapper div{
float:left;
}
#div1{
padding-right:5px;
}
#div2
{
width:16px;
height:100%;
padding-right:10px;
}
#div3{
padding-right:5px;
}
</style>
As you can see, there's nothing fancy about this code. The inner divs all have
varying height. When I check the rendered clientHeight, here's what IE gives me:
div1 607px
div2 809px
div3 469px
div4 645px
The way my page works, the user can interact with the page and adjust the height
& width of div3. I'm also using strict HTML in my doctype.
Here are my problems:
1) div2 needs to be the height of the screen plus any height the user may have
added to div3. I'm currently using javascript to get the height of the screen
with document.documentElement.clientHeight (in IE). This works fine until the
user increases the height of div3 more than the screen. So if the screen is
809px in height and the user increases div3 to 1278px, the javascript code only
gets 809px. I would like to use CSS to get expand div2 to the screen height or
the div3 height, whichever is more.
2) When the user increases the width of div3, larger values are pushing div4
below div1, div2 & div3. Instead of pushing div4 to the right, like I want it
to, it's being forced down. I've found that when I increase the width of the
wrapper div, this allows div4 to move to the right as it should when div3's
width is increased. I want to adjust the CSS so that div4 will not be pushed
down and will slide over to the right as needed dynamically.
3) Lastly, my mouse cursor is disappearing when I move it over the wrapper. Has
anyone ever encountered anything like that??
designer friend, and tinkering with my CSS, I have to ask these questions
because nothing works!
I have a simple layout. A container div and inside of it 4 wrapper divs floated
left. Here's the code:
<div id="wrapper">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
</div>
<style type="text/css">
#wrapper{
padding-left:5px;
width:100%;
height:100%;
}
#wrapper div{
float:left;
}
#div1{
padding-right:5px;
}
#div2
{
width:16px;
height:100%;
padding-right:10px;
}
#div3{
padding-right:5px;
}
</style>
As you can see, there's nothing fancy about this code. The inner divs all have
varying height. When I check the rendered clientHeight, here's what IE gives me:
div1 607px
div2 809px
div3 469px
div4 645px
The way my page works, the user can interact with the page and adjust the height
& width of div3. I'm also using strict HTML in my doctype.
Here are my problems:
1) div2 needs to be the height of the screen plus any height the user may have
added to div3. I'm currently using javascript to get the height of the screen
with document.documentElement.clientHeight (in IE). This works fine until the
user increases the height of div3 more than the screen. So if the screen is
809px in height and the user increases div3 to 1278px, the javascript code only
gets 809px. I would like to use CSS to get expand div2 to the screen height or
the div3 height, whichever is more.
2) When the user increases the width of div3, larger values are pushing div4
below div1, div2 & div3. Instead of pushing div4 to the right, like I want it
to, it's being forced down. I've found that when I increase the width of the
wrapper div, this allows div4 to move to the right as it should when div3's
width is increased. I want to adjust the CSS so that div4 will not be pushed
down and will slide over to the right as needed dynamically.
3) Lastly, my mouse cursor is disappearing when I move it over the wrapper. Has
anyone ever encountered anything like that??