Forum Moderators: not2easy

Message Too Old, No Replies

Nested Div's

Width Issue with Nested Div's

         

joshlrogers

1:54 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



Ok, I am about to put my head through a wall if I can't figure this out. My issue is I am trying to get away from tables and do everything with <div> tags and css. Here is my issue I am trying to put two divs into another div, essentially two <td>'s within a <tr>. So here is what I have got.

}div.contentblock {
position: relative;
top: 109px;
height: 100%;
width: 100%;
}div.rightbar {
margin-left: 122px;
width: 100%;
height: 100%;
border-style: solid;
border-width: 1;
}div.leftbar {
float: left;
width: 122px;
z-index: 1;
}div.leftcontent {
position: fixed;
left: 5px;
z-index: 1;
}


<div class = 'contentblock'>
<div class = 'leftbar'>
<span class = 'leftcontent'>
<a class="menulink" href="index.htm">&middot;&nbsp;Home</a><br />
<a class="menulink" href="lnchandlrn/index.htm" target = 'content'>&middot;&nbsp;Lunch & Learn</a>
</span>
</div>
<div class = 'rightbar'>
</div>
</div>

My issue is that the right bar is extending beyond the width of the parent div. sort of like below


¦----------------------¦
¦¦-----¦¦--------------¦-¦
¦¦ Div ¦¦ Right Div Box¦ ¦
¦¦-----¦¦--------------¦-¦
¦----------------------¦

I want the right div box to be restricted to the width of the parent. It is driving me nuts, and I really don't want to go back to using tables, but I may have to if I can't get this resolved quickly. Thanks so much in advance.

joshlrogers

2:19 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



Update:

I have removed the width tag of the div.rightbar property and that gave me the desired effect of width, but my height now is not at 100%. Any ideas?

joshlrogers

12:29 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



/bump