I have code:<th colspan="3" />
<div class="l_table_th" /></div>
<div class="c_table_th" />Zamów pakiet punktów</div>
<div class="r_table_th"/ ></div>
</th>
我有代码:< div class="l_table_th" />
Zamow punktowleft and right div's are necessary for rounded corners (by background, no CSS3) of HEADER for table. And my problem is: how to make center div fill all the space between them? width: 100% makes right div is falling to the next line. width: auto makes center div too short.
左和右div对于表的圆角(通过背景,没有CSS3)是必要的。我的问题是:如何让中心div填满它们之间的所有空间?宽度:100%使右div下降到下一行。宽度:auto使中心div太短。
2 个解决方案
#1
4
Try setting margins (left and right) for central <div>
. Assuming that .l_table_th
and .r_table_th
are 15px wide, something like this should work:
尝试设置中心
<th colspan="3" />
<div class="l_table_th"></div>
<div class="r_table_th"></div>
<div class="c_table_th">Zamów pakiet punktów</div>
</th>
.c_table_th {
margin: 0 15px 0 15px;
}
.l_table_th {
width: 15px;
float: left;
}
.r_table_th {
width: 15px;
float: right;
}
#2
0
wrap them in another div apply a background color?
将它们包装在另一个div应用背景色?
#1
4
Try setting margins (left and right) for central <div>
. Assuming that .l_table_th
and .r_table_th
are 15px wide, something like this should work:
尝试设置中心
<th colspan="3" />
<div class="l_table_th"></div>
<div class="r_table_th"></div>
<div class="c_table_th">Zamów pakiet punktów</div>
</th>
.c_table_th {
margin: 0 15px 0 15px;
}
.l_table_th {
width: 15px;
float: left;
}
.r_table_th {
width: 15px;
float: right;
}
#2
0
wrap them in another div apply a background color?
将它们包装在另一个div应用背景色?