Click to See Complete Forum and Search --> : Really struggling with this
realtime158
01-24-2007, 09:50 PM
Here is some table example of what I want to accomplish using css basically with out using float right in css how do i display the exact same content layout using div tags. Thanks...
<table width="547" border="0" cellspacing="5" cellpadding="5">
<tr>
<td width="196">Content 1 </td>
<td width="316">Content 2 </td>
</tr>
</table>
<br />
<br />
<table width="547" border="0" cellspacing="5" cellpadding="5">
<tr>
<td width="196">Content 1 </td>
<td width="155">Content 2 </td>
<td width="156">Content 3 </td>
</tr>
</table>
Centauri
01-24-2007, 10:00 PM
So, what's the problem with using a float? - its one of the useful things you can do with css...
Cheers
Graeme
realtime158
01-25-2007, 06:34 AM
the problem is i got a div layer that is centered when i use float how do i move that box laye to the position so that it stays within my layout
Centauri
01-25-2007, 06:59 AM
How about this html <div id="top">
<div class="left">Content 1</div>
<div class="right">Content 2</div>
</div>
<div id="mid">
<div class="left">Content 1</div>
<div class="right">Content 3</div>
<div class="centre">Content 2</div>
</div>
and this css * {
border: 0;
margin: 0;
padding: 0;
}
#top {
padding: 5px;
width: 547px;
margin: 15px 15px 40px;
}
.left {
width: 196px;
float: left;
padding: 5px;
}
#top .right {
margin-left: 201px;
padding: 5px;
}
#mid {
width: 547px;
padding: 5px;
margin: 15px 15px 40px;
}
#mid .right {
width: 156px;
float: right;
padding: 5px;
}
#mid .centre {
margin: 0 161px 0 201px;
padding: 5px;
}
The floats are within other containers, so you should be able to use this anywhere.
Cheers
Graeme
realtime158
01-25-2007, 10:13 AM
Thanks for all of your help what is a good css book to buy that will guide me more into this.
ray326
01-25-2007, 12:39 PM
Check out the ones in my sig.