|
|
Subject:
CSSP div vertical alignment issue
Category: Computers > Programming Asked by: carbon-ga List Price: $5.00 |
Posted:
26 Jul 2005 20:56 PDT
Expires: 28 Jul 2005 00:12 PDT Question ID: 548362 |
There exists a 'row' div. Inside it are two other divs, one floating left, the other floating right. I want the divs' bottoms to be vertically aligned. The code is here: http://www.rafb.net/paste/results/FEq02K88.html or, just in case something horrible goes wrong with rafb, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>blah</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- body { margin: 0; padding: 0; } .row { clear: both; } .left { border: 1px solid green; float: left; } .right { border: 1px solid blue; float: right; } --> </style> </head> <body> <div class="row"> <div class="left"> <div>want this box to come down so its bottom</div> <div>aligns with the bottom of the other one</div> </div> <div class="right"> <div>right now the tops are aligned vertically</div> <div>left box needs to come down</div> <div>so that their bottoms are aligned vertically</div> <div>more text</div> <div>more text</div> <div>more text</div> </div> </div> </body> </html> | |
| |
|
|
There is no answer at this time. |
|
Subject:
Re: CSSP div vertical alignment issue
From: willcodeforfood-ga on 27 Jul 2005 15:16 PDT |
You could put your DIVs inside a TABLE unless you are a TABLE hater like some style purists. This works in IE, just replace the inner contents of your main "row" DIV with: <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td valign="bottom"> <div class="left"> <div>want this box to come down so its bottom</div> <div>aligns with the bottom of the other one</div> </div> </td> <td valign="bottom"> <div class="right"> <div>right now the tops are aligned vertically</div> <div>left box needs to come down</div> <div>so that their bottoms are aligned vertically</div> <div>more text</div> <div>more text</div> <div>more text</div> </div> </td> </tr> </table> |
Subject:
Re: CSSP div vertical alignment issue
From: carbon-ga on 27 Jul 2005 15:50 PDT |
Thanks for writing, but I'm a registered table hater. I'm trying not to use any unless absolutely necessary. Vertical alignment seems to be a weak spot in CSS. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |