html - 我想让这个部分的高度随着它的内容而增加
问题描述
我试过这个
<section class="unique">
<div class="this d-flex pt-5">
<div class="leftside2 w-50 h-100">
<img src="images/twowomen.jpg" alt="twowomen" class="img-fluid">
</div>
<div class="rightside2 w-50 h-100">
<h5 class="text-success pl-5">WE HELP YOU</h5>
<div class="fineText d-flex pl-5">
<h3>Get A</h3>
<h3 class="consulting pl-2">CONSULTING</h3>
</div>
<form action="">
<div class="form-group">
<input type="text" class="inputs font-weight-bold py-2 ml-5" placeholder="Your Name" id="fname" required>
</div>
<div class="form-group">
<input type="text" class="inputs font-weight-bold py-2 ml-5" placeholder="Your Email Adress" id="fname" required>
</div>
<div class="form-group">
<input type="text" class="inputs font-weight-bold py-2 ml-5" placeholder="Phone Number" id="fname" required>
</div>
<div class="form-group">
<input type="text" class="inputs font-weight-bold py-2 ml-5" placeholder="I would like to discuss" id="fname" required>
</div>
<div class="form-group">
<button type="button" class="btn btn-success ml-5">SUBMIT</button>
</div>
</form>
</div>
</div>
<div class="info bg-success w-25 text-white font-weight-bold p-4">
<span>ADDRESS</span>
<p class="pb-3">Mostafa Naguib <br> Street, 14 Box, Cairo, <br> Egypt</p>
<span>EMAIL</span>
<p class="pb-3">cairooffice@financer.com</p>
<span>PHONE NUMBER</span>
<p class="pb-3"><a href="#" class="text-decoration-none">002 0100 843 1112</a></p>
<span>WEBSITE</span>
<p>www.financer.org</p>
</div>
</section>
然后是样式:
.form-group .inputs{
border: none !important;
border-bottom: 1px solid #ccc !important;
width: 70% !important;
}
.form-group .btn{
padding: 15px !important;
padding-left: 45px !important;
padding-right: 45px !important;
border-radius: 50px !important;
}
.fineText .consulting{
font-size: 37px;
font-family: "Gabriola";
color: #28a745;
font-weight: bolder;
}
.rightside2{
padding-left: 100px !important;
}
.info{
position: absolute;
top: 1630px;
left: 400px;
/* padding: 35px !important; */
}
.unique{
height: 600px;
}
.this .rightside2 .leftside2{
height: 100%;
}
但是在尝试之后,只有部分的高度增加了,但leftside and
右侧`保持不变。
图像上方和下方的空间是该部分的高度,leftside
并且rightside
应该填充该空间。
我进行了研究,但没有找到任何有用的建议。
请我需要帮助。提前致谢
解决方案
您为什么不尝试使用百分比而不是使用固定测量值?我也不清楚你的意思
图像上方和下方的空间是部分的高度,左侧和右侧应该填充空间。
您能否对此进行扩展,也许我可以提供进一步的帮助?
推荐阅读
- jquery - jQuery 模板中的自动完成
- r - 无法在 R 中创建包
- notifications - 收到电子邮件:请在 2018 年 5 月 21 日之前为您在 Microsoft 注册的每个应用提供服务条款和隐私声明
- javascript - 在 html img src 代码中调用 JavaScript 函数(随机 img 生成器)
- html - 如何使我的椭圆形条带在css中有波浪?
- ios - 如何使用 segue 快速创建表格?
- canvas - Internet Explorer 画布呈现不同的 CJK 通用字体
- python - pyAudio what is the in_data in callbacks?
- javascript - SVG Path drawing
- postgresql - 带约束的 Ecto.Migration - 子/父