**THIS IS MY HTML**
<div class="table">
<table>
<tr>
<td><a href="otherpage.html">Home</a></td>
<td><a href="otherpage.html">About us</a></td>
<td><a href="otherpage.html">Testimonials</a></td>
<td><a href="otherpage.html">Contact us</a></td>
<tr>
</table>
</div>
这是我的CSS
html,body{
margin:0;
height:100%;
background: linear-gradient(red,pink);
}
.table{
background-color:black;
margin:0;
}
td,a{
padding:25px;
margin:80px;
}
答案 0 :(得分:1)
尝试将以下代码添加到CSS中:
td a { white-space: nowrap; }
答案 1 :(得分:0)
html,body{ margin:0; height:100%; background: linear-gradient(red,pink); } .table{ background-color:black; margin:0; } td,a{ padding:20px; }
<div class="table">
<table>
<tr>
<td><a href="otherpage.html">Home</a></td>
<td><a href="otherpage.html">About us</a></td>
<td><a href="otherpage.html">Testimonials</a></td>
<td><a href="otherpage.html">Contact us</a></td>
<tr>
</table>
</div>
答案 2 :(得分:-1)
添加到您的体宽:100%或watever然后在您的表中指定宽度和高度百分比 所以,假设你的桌子需要与身体宽度和身高相匹配,那么你需要在你的css表中添加宽度:100%和高度:100%或者你喜欢的任何百分比