View Full Version : Float Strangeness
NancyJ
10-05-2005, 01:41 PM
I've got 2 floating divs and a table I want to display with the 2 floating divs next to each other and the table underneath and they're set out like
<div>
left block
</div>
<div>
right block
</div>
<table>
</table>
the floating blocks have a width of 50% and are floated left and right.
The table is set to clear both.... however it displays like this:
Tynan
10-05-2005, 01:48 PM
if it's a static page can't you just position them absolutely?
with the table in a div?
sorry if I'm utterly missing something here
(and shouldn#'t you be showing the code?)
NancyJ
10-05-2005, 01:56 PM
Its not a static page and I have posted the code - the important bits anyway ;) but if it will make you feel better:
<div class =" leftblock">
<strong>Billing Address</strong>
<p>Bob,<br />
asdsadasdas<br />asdas<br />
BD5 9PL<br />
<!--fldBillCountry-->
</p>
</div>
<div class =" rightblock">
<strong>Shipping Address</strong>
<p>Hazel Ryan,<br />
ajkdsajd<br />asdkslajda<br />
Bd5 9PL<br />
<!--fldShipCountry-->
</p>
</div>
<form action =" pay.asp" method =" post">
<table width =" 100%" style =" text-align:left" cellspacing="0" style =" clear:both;display:block;">
<!--SummaryHeader--><tr class =" prodtype"><th scope =" col">Product Code</th><th scope =" col">Product</th><th scope =" col" class =" smallcell">Qty</th><th scope =" col">Price</th><th scope =" col">Subtotal</th></tr><!--SummaryRow--><tr class =" "><td>C13T050140</td><td>Epson Consolidated S020093/187 Stylus Black</td><td class =" smallcell"><input type ="hidden" name =" quantity<!--fldProductID-->" value ="<!--Quantity-->" />2</td><td>£13.49</td><td>£26.98</td></tr><!--SummaryRow--><tr class =" "><td>C13T050142</td><td>Epson Consolidated Stylus 400/440/500/600/640 Black Twin S020206/208</td><td class =" smallcell"><input type ="hidden" name =" quantity<!--fldProductID-->" value ="<!--Quantity-->" />1</td><td>£23.75</td><td>£23.75</td></tr><!--SummaryRow--><tr class =" "><td>C4873A</td><td>HP No80 DesignJet 1050C/1055CM Ink Cartridge Yellow 175ml</td><td class =" smallcell"><input type ="hidden" name =" quantity<!--fldProductID-->" value ="<!--Quantity-->" />2</td><td>£39.20</td><td>£78.40</td></tr><!--SummaryRow--><tr class =" "><td>15M0640</td><td>Lexmark SF3000/SF4000</td><td class =" smallcell"><input type ="hidden" name =" quantity<!--fldProductID-->" value ="<!--Quantity-->" />1</td><td>£18.04</td><td>£18.04</td></tr>
<tr class ="prodprint"><td colspan =" 3"></td><th scope="row">Total ex VAT</th><td>£121.41<input type =" hidden" name =" total" value =" 147.17" /></td></tr>
<tr class ="prodprint"><td colspan =" 3"></td><th scope="row">VAT</th><td>£25.76<input type =" hidden" name =" total" value =" 147.17" /></td></tr>
<tr class ="prodtype"><td colspan =" 3"></td><th scope="row">Total</th><td>£147.17<input type =" hidden" name =" total" value =" 147.17" /></td></tr>
<tr><td colspan =" 4"></td><td><input type ="submit" name ="action" value =" Pay" /></td></tr>
</table>
</form>
Tynan
10-05-2005, 03:43 PM
why can't you wrap the table in a div and set it 'clear:left;'
worked for me, 1st address top left, second address top right, table appears below
(I'm assuming what your css is for the divs)
sorry if I'm missing something, it's entirely likely
mrruben5
10-05-2005, 11:09 PM
Or even simpler. Just float the table. It will jump to the next line anyway.
ronaldb66
10-06-2005, 08:20 AM
It would help if you provided the style sheet, too; from the screen shot it looks like there's some absolute positioning involved as well.
I reckon you don't have it online somewhere? Trying to solve things like this from code snippets without having the whole picture can be troublesome and inefficient.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.