The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
TD - vertical alignment top AND bottom?
I got the following problem and haven't found a (good working) solution:
Let's say there is a table cell (td). Within this cell, I have two div elements. The first one should be aligned ad the top of the cell, the second one at the bottom. Any idea how this could be done? |
#2
|
||||
|
||||
Vertical alignment is not easy to do in CSS - easier in Table layouts (bad Natch, bad Natch!) ...
Try Code:
<td> <div valign="top" style="height="50%"> </div> <div valign="bottom" style="height="50%"> </div> </td> |
#3
|
||||
|
||||
Doesn't work at alll.
- DIV tags don't have a valign-attribute. - the style definition is invalid So I modified the code: Code:
<td> <div style="height: 50%; vertical-align: top"> </div> <div style="height: 50%; vertical-align: bottom"> </div> </td> |
#4
|
||||
|
||||
'scuse me for being tired
|
#5
|
||||
|
||||
*bump*
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Just a test</title> </head> <body> <table border="1" style="height: 1px"> <tr> <td> some<br> longer<br> content<br> here<br> in this<br> cell<br> </td> <td> <table width="100%" style="height: 100%" border="0"> <tr> <td valign="top">this should be at top</td> </tr> <tr> <td valign="bottom">this should be at bottom</td> </tr> </table> </td> </tr> <tr style="height: 10px"> <td colspan="2"> </td> </tr> <tr> <td> some<br> longer<br> content<br> here<br> in this<br> cell<br> </td> <td valign="top"> <table width="100%" style="height: 100%" border="0"> <tr> <td valign="top">this should be at top</td> </tr> <tr> <td valign="bottom">this should be at bottom</td> </tr> </table> </td> </tr> </table> </body> </html> How could I get it working? |
#6
|
||||
|
||||
*bump*
I'd really need a solution for this ... Anyone? |
#7
|
|||
|
|||
Why not use CSS Positioning to work out your problem. Check this link -> http://www.w3.org/TR/REC-CSS2/visure...ed-positioning
|
#8
|
||||
|
||||
Hmm ... can you give an example on how to use this?
I can't seem to get it working If I create two divs with
Same for position: absolute |
#9
|
|||
|
|||
Hmmm...let me play with this a bit & get back to you.
|
#10
|
||||
|
||||
Thanks a lot
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|