gpt4 book ai didi

html - 需要两列堆叠而不是重叠移动

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

我试图让这两列响应,但无论我尝试什么,它们都是重叠的。

如有任何帮助,我们将不胜感激!

#serviceTop{width:48%;margin:0 0 0 160px;}
#minicontact{width:25%;float:right;margin:-525px 155px -5px 0;}
#button4{margin:0 0 0 122px;height:55px;width:145px;border-radius:20px;background-color:#6db9fa;color:#ffffff;font-size:14px;}
#miniformtitle{margin:76px 0 -38px 90px;}
<div id="serviceTop">
<h2>We put time back in your week.</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus lacus, vestibulum a augue quis, dignissim venenatis arcu. Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
<p>Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
<h3>Here to simplify your day!</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus lacus, vestibulum a augue quis, dignissim venenatis arcu. Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
<p>Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
</div>
<p>&nbsp;</p>
<div id="minicontact">
<h3 id="miniformtitle">Get Started</h3>
<form class="contact" action="&lt;?=$_SERVER['REQUEST_URI'];?&gt;#cform1" method="post" name="simp_cont">
<p><br /> <input id="captcha" class="input" style="position: absolute; left: -9999px;" name="captcha" type="text" /><br /> <input id="name" name="fname" type="text" placeholder="NAME" /><br /> <input id="phone" name="phone" type="text" placeholder="PHONE NUMBER" /><br /> <input id="email" name="email" type="text" placeholder="EMAIL ADDRESS" /><br /> <input id="footage" name="footage" type="text" placeholder="ESTIMATED SQUARE FOOTAGE" /><br /> <textarea class="textarea" name="message" placeholder="COMMENTS"></textarea></p>
</form></div>

最佳答案

添加一个媒体查询,不仅将宽度设置为 100%,而且还重置边距:

(注意:根据需要调整媒体查询中的max-width)

#serviceTop {
width: 48%;
margin: 0 0 0 160px;
}

#minicontact {
width: 25%;
float: right;
margin: -525px 155px -5px 0;
}

#button4 {
margin: 0 0 0 122px;
height: 55px;
width: 145px;
border-radius: 20px;
background-color: #6db9fa;
color: #ffffff;
font-size: 14px;
}

#miniformtitle {
margin: 76px 0 -38px 90px;
}

@media screen and (max-width: 700px) {
#serviceTop,
#minicontact {
width: 100%;
margin: 0;
}
#miniformtitle {
margin: 0;
}
}
<div id="serviceTop">
<h2>We put time back in your week.</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus lacus, vestibulum a augue quis, dignissim venenatis arcu. Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie
fermentum sit amet suscipit tortor.</p>
<p>Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
<h3>Here to simplify your day!</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam purus lacus, vestibulum a augue quis, dignissim venenatis arcu. Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie
fermentum sit amet suscipit tortor.</p>
<p>Donec faucibus pulvinar viverra. Curabitur semper ex ex, ut fermentum risus tempus sit amet. Nunc in diam id nibh molestie fermentum sit amet suscipit tortor.</p>
</div>
<p>&nbsp;</p>
<div id="minicontact">
<h3 id="miniformtitle">Get Started</h3>
<form class="contact" action="&lt;?=$_SERVER['REQUEST_URI'];?&gt;#cform1" method="post" name="simp_cont">
<p><br /> <input id="captcha" class="input" style="position: absolute; left: -9999px;" name="captcha" type="text" /><br /> <input id="name" name="fname" type="text" placeholder="NAME" /><br /> <input id="phone" name="phone" type="text" placeholder="PHONE NUMBER"
/><br /> <input id="email" name="email" type="text" placeholder="EMAIL ADDRESS" /><br /> <input id="footage" name="footage" type="text" placeholder="ESTIMATED SQUARE FOOTAGE" /><br /> <textarea class="textarea" name="message" placeholder="COMMENTS"></textarea></p>
</form>
</div>

关于html - 需要两列堆叠而不是重叠移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45593104/

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