gpt4 book ai didi

html - 调整表格列宽

转载 作者:太空宇宙 更新时间:2023-11-04 13:14:10 24 4
gpt4 key购买 nike

我的以下代码有一个包含两列的表格。表格的总宽度为 800px。我希望两列的宽度相等。因此我为每个设置了 400px。但它没有用。我想我需要修改我的代码才能得到它。应该怎么做?

<html>
<head>
<title>OCAAS</title>
</head>

<style>
html { height: 100%; }

body {
background: #f5f0ed;
font: 10px/1 Tahoma, Geneva, Arial, sans-serif;
font-weight: bold;
text-aligh: center;
BACKGROUND-POSITION: center bottom;
}

#image{
width: 300px;
height: 300px;
clear: both;
margin-right: 500px;
margin-top: -250px;
background: #green;
}
// amend the image
#image div{
width: 500px;
height: 100px;
float: left;
line-height: 100px;
text-align: center;

}

#image div img{
display: inline-block;
vertical-align: top;
max-width: 80%;
max-height: 80%;
}


</style>

<BODY>
<table width="800px" height="100%" cellpadding="1" cellspacing="1" border="1" align="center">
<tr>
<td align="right" valign="middle" width="400px">
<div id="image">
<div><img src="cat.jpg" border="0"/></div>
</div>
</td>
<td align="right" valign="middle" width="400px">
<div id="wording">
<div><p>I AM NEW TO THIS</p></div>
</div>
</td>
</tr>
</table>

<div id="title">

</div>
</body>
</html>

最佳答案


table{width:100%}<br/>td{width:50%}

关于html - 调整表格列宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24490949/

使用 css :

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com