Tapan
1
Hi,
I made this table:
<table align="center" width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="cell_head">Browse Categories</td>
</tr>
<tr>
<td class="cell_cont">Lorem ipsum dolor sit amet.</td>
</tr>
</table>
And here’s the css code:
.cell_head
{
height:30px;
width:200px;
background-image: url("images/category_cell.png");
font-size:13px;
font-weight:bold;
color:#fff;
padding-left:14px;
border:0px;
}
.cell_cont
{
width:200px;
padding:3px;
border:1px solid #000;
font-size:12px;
}
How to convert the table into css layout to achieve same result ?
Thanks.
<div id="divWrapper">
<div class="cell_head">Browse Categories</div>
<div class="cell_cont">Lorem ipsum dolor sit amet.</div>
</div>
#divWrapper {
width:20em;
min-height:3em;
}
.cell_head
{
height:3em;
width:100%;
background-image: url("images/category_cell.png");
font-size:13px;
font-weight:bold;
color:#fff;
padding-left:1.4em;
border:0px;
}
.cell_cont
{
width:100%;
padding:3em;
border:1px solid #000;
font-size:1.2em;
}
Not tested, let me know if you have any trouble.
Quick tip, stay away from fixed px widths and go for min/max em widths.