views:

21

answers:

1

Hi

I am currently rebuilding a website that uses a table layout and want it to make it with layers and css.

The problem I am having is with the header. The header is currently a table at 100% width with 3 cells.

[left frame][logo 800px][rightframe]

<table border="0" width="100%" height="600" cellpadding="0" cellspacing="0">
  <tr>
    <td background="images/background_left.jpg">&nbsp;</td>
    <td width="800" valign="top">the header content</td>
    <td background="images/background_right.jpg">&nbsp;</td>
  </tr>
</table>

The center cell, the logo banner, is should always be 800px. The left and right cell have a background that matches the ends of the logobanner.

Now the question would be how I can solve this with css ?

Thanks

+1  A: 

Try this Html:

<div id="header">
   <div id="left">
      <div id="leftFrame"></div>
      <div id="center"></div>
   </div>
   <div id="right"></div>
</div>

CSS:

#header{
 width:100%;
 height:600px;
}
#left{
 width:66%;
 float:left;
}
#right{
 float:right;
}
#center{
 width:800px;
 float:right;
}
#leftFrame{
 float:left;
}

Not tested but hope this helps

Rigobert Song