gpt4 book ai didi

html - 如何更改链接列表的位置?

转载 作者:行者123 更新时间:2023-11-28 02:49:18 25 4
gpt4 key购买 nike

我正在设计我网站的页脚并有以下问题:我怎样才能更改我的 CSS,使其看起来像这样:

enter image description here

footer{
background-color: #e0ebeb;
list-style-type: none;
display: inline;


}

#Questions {
margin: auto;
text-align: center;
display: block;
padding: 0;
}
 <footer>


<div class="Newsletter">
<h1>Get our Newsletter</h1>
<h2>Stay tuned and new gadgets everday!</h2>
</div>

<div class="secondpt" >
<div id="Questions">
<h1>Do you have a question </h1>
<ul>
<li><a href="#">Contact us</a></li>
</ul>

</div>
<div id="Menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Who are we ?</a></li>
<li><a href="#">Newest</a></li>
<li><a href="#">The Best</a></li>
</ul>
</div>

<div id="languages">
<ul>
<li><a href="#">English</a></li>
<li><a href="#">Deutsch</a></li>
<li><a href="#">Français</a></li>
</ul>

</div>
</div>
<hr>
<div>
<h1>Connect with us</h1>
</div>

</footer>

最佳答案

您可以使用 float 实现此目的属性:

*{
font-size:15px;
}
ul {
list-style:none;
}
footer{
background-color: #e0ebeb;
list-style-type: none;
display: inline;
}


.secondpt {
width: 100%;
}

div#Menu {
float: left;
}

div#languages {
float: right;
}

.right{
float:right
}
.left{
float:left
}
<footer>
<div class="Newsletter">
<h1>Get our Newsletter</h1>
<h2>Stay tuned and new gadgets everday!</h2>
</div>

<div class="secondpt" >
<div class="left">
<div id="Questions">
<h1>Do you have a question </h1>
<ul>
<li><a href="#">Contact us</a></li>
</ul>

</div>
</div>
<div class="right">
<div id="Menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Who are we ?</a></li>
<li><a href="#">Newest</a></li>
<li><a href="#">The Best</a></li>
</ul>
</div>

<div id="languages">
<ul>
<li><a href="#">English</a></li>
<li><a href="#">Deutsch</a></li>
<li><a href="#">Français</a></li>
</ul>
</div>
</div>
</div>
<hr>
</footer>

关于html - 如何更改链接列表的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46749290/

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