I am an iPhone developer stuck with some basic CSS properties;) I want to show something like this: 
This is what I have:
<div class="cell"> <div class="cell_3x3_top"> <div class="cell_3x3_type rounded_left">type</div> <!--UPDATED:2010/09/29--> <div class="cell_3x3_title rounded_right">title</div><!--UPDATED:2010/09/29--> </div> <div class="cell_3x3_content rounded_left rounded_right">content</div><!--UPDATED:2010/09/29--> </div>
and css:
div.cell_3x3_top{ height:20%; margin: 0 0 0 0; padding: 0 0 0 0; border: none; margin-bottom: 1px; /*to compensate space between top and content*/ text-align: center; vertical-align: middle; } div.cell_3x3_type{ width:20%; float:left; background-color: inherit; margin-right: -2px; /*UPDATED:2010/09/29*/ } div.cell_3x3_title{ width:80%; float:left; background-color: inherit; margin: 0 0 0 0; /* maybe not neccesary*/ padding: 0 0 0 0; /*maybe not neccesary*/ margin-left: -1px; /*UPDATED:2010/09/29 */ } div.cell_3x3_content{ height:80%; background-color: inherit; }
But when I do my content with the code above the title , the div seems too big and appears under the type div, why is this? type div - width 20%, title - width 80%, so it should be 100% even. Is there any stock or other metric that I forgot here? I tried to move the title div to the left using a field, but is still faulty. I wonder what is the right way to get something like a picture? (Not entirely because if you look closer at the title div a little shorter than it should be. See that its right border is not aligned with the content div.)
Thanks in advance.
EDIT: 2010/09/28
This is actually what I want to achieve: 
and this is what I have: 
The code (updated a bit) will work if I didn’t have border divs. Since the border width is 1px, I need to set the type div width to 20% -2px (left border + right border = 2px) and title div to 80% -2px
.rounded_left{ border-top-left-radius: 4px 4px; border-bottom-left-radius: 4px 4px; border-color:gray; border-width: 1px; border-style:solid; }
(. rounded_right looks like)
This is not related to the clear:both property that I consider. I tried and had no effect since my content div was a good start.
In short: how can I make a div, including its border, to say exactly 20% of the width?
Ignacio
Answer:
I realized that the div shell around the type and name solves the problem accordingly. So my answer is something like this:
<td class="cell"> <div class="cell_3x3_top bordered"> <div class="cell_3x3_type_container"><div class="cell_3x3_type rounded_left full_height">6</div></div> <div class="cell_3x3_title_container"><div class="cell_3x3_title rounded_right full_height">title</div></div> </div> <div class="cell_3x3_content rounded_left rounded_right">content</div> </td>
I set 20% and 80% in containers and borders in the inner div.