我有一行HTML表格。在那一行有3个单元格(td元素)。中心单元格包含页面的所有主要内容p个元素&。左边的&右边的td元素包含一个img元素;他们是左边&右侧蓝色列的图像。使HTML表格高度等于中间TD元素的高度
我的问题:我想让桌子的高度等于中心td元素的高度而已。而左边的&右边的图像将根据中心td元素的尺寸(高度)向下放大&。但现在,表格总是高度为1200px &那是因为左边的&右边的图像高度是1200px。
我希望这是有道理的&,你明白我在做什么:P 所以我试图使表的高度只与中心TD单元的高度相等。
有没有办法在纯HTML中做到这一点& CSS。如果没有JavaScript会做到这一点不会呢?
.contentTable { height: inherit; }
.tableTopPanel { height: 6.25%; }
.tableBottomPanel { height: 6.25%; }
.tableLeftPanel { width: 6.25%; padding: 0; margin: 0; }
.tableRightPanel { width: 6.25%; padding: 0; margin: 0; }
.tableCentrePanel { background-color: #FFFFFF; }
.pageContent { border-color: #99CCFF; border-width:thin; border-style:solid; border-right-width:thick;
border-bottom-width:thick; padding-top: 0.5em; border-top: 0; }
![]() | Kazcare cooperates with WEA Illawarra to offer a range of educational courses. Some of the courses held at Kazcare Education Facilities include:
To view the full range of WEA Illawarra courses held at KazCare please visit WEA Illawarra Courses. | ![]() |
2011-08-31
Marek