0

标题很容易解释,但基本上我需要表格行等于提供的表格空间,并且表格单元格具有相同的宽度。我在网上尝试了很多建议,但我无法弄清楚。任何帮助是极大的赞赏。

HTML:

<div id="content">
<div id="boxes">
    <table>
        <tr>
            <td>
                <h2>News</h2>

                <h6>The new website is up!</h6>
                <p>The new website is up take a look around and be sure to visit our games page and have a good time. =)</p>
            </td>
            <td>
                <h2>Other Stuff</h2>

                <h6>This is where some other info goes</h6>
                <p>We can type other types of information in here for the general public to know.</p>
            </td>
            <td>test</td>
            <td>test</td>
        </tr>
    </table>
</div><!--end boxes-->
</div><!--end content-->

CSS:

#content{
text-align:center;
width:90%;
margin-left:auto;
margin-right:auto;  
}
#content #boxes table{
table-layout:fixed; 
}
#content #boxes table tr td{
border-top:30px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
height:250px;
width:23%;
table-layout:fixed;
text-align:left;
float:left;
display:inline-block;   
}
#content #boxes table tr td:hover{
border-top:30px solid #F00;
border-left:1px solid #F00;
border-right:1px solid #F00;    
}
4

1 回答 1

1

更改#content #boxes table tr td为:

border-top:30px solid #000;
border-left:1px solid #000;
border-right:1px solid #000;
border-collapse:collapse;
height:250px;
width:25%;
text-align:left;

小提琴

编辑:谢谢Pumbaa,删除了不必要的指令

于 2012-06-20T01:37:46.977 回答