..如果列高度取决于另一列的高度?解决方案至少应该适用于IE6,7和Mozilla.
HTML表格布局:
+------------------------+----------------------+ | top-aligned paragraph | Here | | | is a | | | very | | | long | | | text | | | that | | | eventually | | | determines | | | the overall | |bottom-aligned paragraph| table height. | +------------------------+----------------------+
Jayx.. 9
最简单的方法应该是vertical-align
在您想要对齐的单元格中使用顶部和底部:
Top aligned paragraph |
Lorem ipsum dolor sit amet consectetuer id egestas condimentum neque elit. Non tortor tempus orci quis condimentum interdum dictum pede Duis enim. Sociis sollicitudin Nulla lacinia risus id sit odio pellentesque Vestibulum et. Ipsum pretium vestibulum et lobortis mauris semper In In id faucibus. Est Integer Curabitur dui Quisque eu habitasse Curabitur gravida vel semper. A libero vel nisl. |
Bottom aligned paragraph |
然后是CSS:
.top{ vertical-align:top; } .bottom{ vertical-align:bottom; }
复制|粘贴
最简单的方法应该是vertical-align
在您想要对齐的单元格中使用顶部和底部:
Top aligned paragraph |
Lorem ipsum dolor sit amet consectetuer id egestas condimentum neque elit. Non tortor tempus orci quis condimentum interdum dictum pede Duis enim. Sociis sollicitudin Nulla lacinia risus id sit odio pellentesque Vestibulum et. Ipsum pretium vestibulum et lobortis mauris semper In In id faucibus. Est Integer Curabitur dui Quisque eu habitasse Curabitur gravida vel semper. A libero vel nisl. |
Bottom aligned paragraph |
然后是CSS:
.top{ vertical-align:top; } .bottom{ vertical-align:bottom; }
复制|粘贴