gpt4 book ai didi

html - 标题文本框与其他框对齐

转载 作者:行者123 更新时间:2023-11-28 03:54:08 25 4
gpt4 key购买 nike

我正在尝试调整此代码以使标题文本框与下面的其他三个文本框对齐,但我无法正确调整

body {
background: #ccc;
font-family: 'Arial', sans-serif;
}

div {
position: relative;
margin: 0px auto;
margin-bottom: 30px;
border: 1px solid #333;
}

.container-head img {
display: block;
margin: 0px auto;
width: &60
}

.container-first {
background: #eee;
}

.container-second {
background: #fff;
}

.container-third {
background: #eee;
}

.container-first,
.container-second,
.container-third {
padding: 10px 10px;
width: 760;
}
<div class="container-head">
<img src="http://media.eloqua.com/designimages/new-oracle-logo2.png" />
</div>
<div class="container-first">
<p>first</p>
</div>
<div class="container-second">
<p>second</p>
</div>
<div class="container-third">
<p>third</p>
</div>

最佳答案

enter image description here给 container-head 添加宽度 760px;

<html>
<head>
<title>Eloqua HTML Test</title>
<style type="text/css">
body { background:#ccc; font-family:'Arial', sans-serif; }
div { position:relative; margin:0px auto; margin-bottom:30px; border:1px solid #333; }
.container-head img { display:block; margin:0px auto; width:&60}
.container-first { background:#eee; }
.container-second { background:#fff; }
.container-third { background:#eee; }
.container-first, .container-second, .container-third,.container-head{ padding:10px 10px; width:760;}
</style>
</head>
<body>
<div class="container-head">
<img src="http://media.eloqua.com/designimages/new-oracle-logo2.png" />
</div>
<div class="container-first">
<p>first</p>
</div>
<div class="container-second">
<p>second</p>
</div>
<div class="container-third">
<p>third</p>
</div>
</body></html>

这里

.container-first, .container-second, .container-third,.container-head{ padding:10px 10px; width:760;}

关于html - 标题文本框与其他框对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43563055/

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