html - 标题没有移动到中心和响应式设计问题
问题描述
我正在尝试将标题“教育”移动到网页的中心,但这样做会遇到问题。
同时,我也在做这部分的响应式设计,上面有图片,下面有文字。谁能帮我解决这些问题?
下面添加了 HTML 和 CSS 代码。
谢谢你。
* {
margin: 0;
padding: 0;
}
.education-sec {
width: 100%;
padding: 40px 0;
overflow: hidden;
}
.education-width {
max-width: 1200px;
overflow: hidden;
padding: 0 20px;
margin: auto;
width: 100%;
display: table;
table-layout: fixed;
}
.education-sec h1 {
font-family: Verdana, Geneva, sans-serif;
font-size: 28px;
text-align: center;
text-transform: uppercase;
}
.education-info {
display: table-cell;
vertical-align: middle;
width: 60%;
padding-top: 30px;
padding-left: 100px;
}
.education-info p {
font-family: Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif;
font-size: 15px;
text-align: justify;
text-justify: inter-word;
line-height: 1.6;
overflow: hidden;
margin: 10px;
}
.ed-under-line h1 {
-webkit-text-decoration: #f57e3a solid underline;
text-decoration: #f57e3a solid underline;
-webkit-text-underline-position: under;
text-underline-position: under;
}
.ed-img {
display: table-cell;
vertical-align: middle;
width: 40%;
}
.ed-img .bw_image {
margin-left: 100px;
max-width: 100%;
height: auto;
padding-top: 50px;
}
<section id="education">
<div class="education-sec">
<div class="education-width">
<div class="ed-under-line">
<h1>Education</h1>
</div>
<div class="ed-img">
<img class="bw_image" src="https://c4.wallpaperflare.com/wallpaper/500/442/354/outrun-vaporwave-hd-wallpaper-thumb.jpg">
</div>
<div class="education-info">
<p> XYZ University
<br> M.Sc
<br> Jan 21 - Sep 22</p>
</div>
</div>
</div>
</section>
解决方案
推荐阅读
- scala - 写入 Parquet 文件并保存为分区表时的保存模式
- automation - Postman:更高级的数据驱动测试——应该如何构建和运行测试?
- android - 带有自定义通知的下载管理器
- report - SSAS 进程后 Power BI 自动刷新
- r - 根据单词或数字将一列分成多列
- php - Yii2 $_GET 参数在 URL
- reactjs - 获取错误:获取errorSyntaxError:JSON.parse:react ajax调用中JSON数据的第1行第1列的数据意外结束
- angular - 如何以角度将数字附加到字符串的末尾?
- angular - 将第三方库导入 JHipster 6 应用程序
- makefile - Makefile 忽略模式中带有子目录的模式规则