我有一个<div>元素,<ul>里面有两个元素。我想将它们并排放置,但是当我这样做时,<ul>元素出现在部分边框之外。我正在开发一个虚假的工作申请项目,出于某种原因展示一些能力(大多数我不具备)。我想让这两个元素出现在边框内。我是 CSS 新手,也不确定“子”或“兄弟”元素。
CSS:
ul {
text-align: left;
font-size: 12pt;
float: left;
display: inline;
}
ul p {
text-decoration: underline;
}
.section {
border-radius: 10px;
border: 2px solid black;
margin: 5px;
}
HTML:
<div class="section">
<h1>My Abilities</h1>
<ul>
<ul>
<p>Hacking</p>
<li>Disable Alarms</li>
<li>Access Security Cameras</li>
<li>Delay Camera and Alarm response time</li>
<li>Disable Guard Pagers</li>
</ul>
<ul>
<p>Gunmanship</p>
<li>Able to handle any type of weapon, big or small</li>
<li>Resourcefull with ammo</li>
<li>Deadshot</li>
<li>Can play many roles, from Heavy to Stealth</li>
<li>Great Getaway driver</li>
<li>Fast reloader with little recoil</li>
<li>Excellent at training others</li>
<li>Military grade training</li>
</ul>
</ul>
</div>
任何帮助表示赞赏!
慕森王
小怪兽爱吃肉
相关分类