d11wtq
03-19-2005, 09:31 PM
I'm working on my own website at the moment and I'm aiming to avoid tables as much as possible using plenty of CSS.
One question:
To achieve a band across the page containing two adjacent boxes I previously did this.
<table width="100%" height="100" cellpadding="0" cellspacing="0">
<tr>
<td width="500" bgcolor="#EEEEEE">Something here</td>
<td bgcolor="#FAFAFA">This is at the right and fills the remaining width</td>
</tr>
</table>
See it fills the entire page width, shows as two blocks but the left one is a fixed width. With CSS I'm pulling my hair out trying to get it working in both IE and CSS using XHTML Strict. I'm trying (except I'm using an external stylesheet):
<div style="width:500px; height:100px; padding:0px; margin:0px; background-color:#EEEEEE; display:block; float:left">
Something here
</div>
<div stlye="height:100px; padding:0px; margin:0px; background-color:#FAFAFA; display:block; float:left">
This is at the right and fills the remaining width
</div>
Can somebody help me out please :( It's getting the right hand side DIV to fill the remaining width that's causing me the headeache.
One question:
To achieve a band across the page containing two adjacent boxes I previously did this.
<table width="100%" height="100" cellpadding="0" cellspacing="0">
<tr>
<td width="500" bgcolor="#EEEEEE">Something here</td>
<td bgcolor="#FAFAFA">This is at the right and fills the remaining width</td>
</tr>
</table>
See it fills the entire page width, shows as two blocks but the left one is a fixed width. With CSS I'm pulling my hair out trying to get it working in both IE and CSS using XHTML Strict. I'm trying (except I'm using an external stylesheet):
<div style="width:500px; height:100px; padding:0px; margin:0px; background-color:#EEEEEE; display:block; float:left">
Something here
</div>
<div stlye="height:100px; padding:0px; margin:0px; background-color:#FAFAFA; display:block; float:left">
This is at the right and fills the remaining width
</div>
Can somebody help me out please :( It's getting the right hand side DIV to fill the remaining width that's causing me the headeache.