htmlcss设置宽⾼相等,HTMLCSS两个相同⾼度和宽度的2列表
我在查询MySQL数据库并使⽤脚本将结果放⼊⾃动⽣成的HTML⽂件中。HTML CSS两个相同⾼度和宽度的2列表格
我有两列需要并排摆放2列和4⾏。
我已将我的HTML & css放在⼩提琴中。
我的HTML代码:
GENE - A
GENE - B
css设置表格滚动条test1test1
test2test2
test3test3
test4test test test test test test test test test test test test test test test test
test11
test2+
test3test3
test4test test
GENE - C
GENE - D
我的CSS代码
table{
font-family:Arial;
border-collapse: separate;
border-spacing: 10px;
}
#container{
width: 500px;
margin-left: auto;
margin-right: auto;
}
#gene_A_description{
width:200px;
height:50px;
background-color:#e13737;
color:white;
text-align:center;
margin-top: 30px;
float: left;
font-family: 'Arial Black', Gadget, sans-serif;
line-height: 50px;
}
#gene_B_description{
width:200px;
height:50px;
background-color:#e13737;
color:white;
text-align:center;
margin-top:30px;
float: right;
font-family: 'Arial Black', Gadget, sans-serif;
line-height: 50px;
}
table.listitems2 {
width: 150px;
margin-left: auto;
margin-right: auto;
}
#gene_A_text{
float:left;
}
#gene_B_text{
float:right;
}
现在这些HTML会⾃动⽣成所以GENE_A_TEXT和GENE_B_TEXT表永远不会包含相同信息等也不会相同,正如可以在⽰例中看到的(因为test4⾏)。
我希望表GENE_A_TEXT和GENE_B_TEXT中的相同⾏具有相同的⾼度,具体取决于其中的信息量。所以,我的下⼀个
GENE_C_DESCRIPTION和GENE_D_DESCRIPTION开始在同⼀⾼度,⽽不是像现在,他们都放在
下⾯GENE_B_TEXT
这是应该如何看起来像
+0
我不明⽩你想要什么。您能否上传您想要的设计的图⽚/插图?它会更容易... –+0
@TamarG off课程,我很抱歉。 –
+0
你的标题应该在同⼀张表中,因为它们⽬前是分开的。 –

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。