gpt4 book ai didi

CSS - 无法将 div 发送到右侧?

转载 作者:太空宇宙 更新时间:2023-11-03 23:53:28 25 4
gpt4 key购买 nike

我正在尝试使用 float:right; 将一个 div block 发送到我页面的右侧。但它不起作用。

HTML:

    <div id="footer_div">
<footer>

<div class="copyrights">
<a href="contact.html" style="
color:#8C8C8C;
font-weight:bold;
text-decoration:none;
font-size:xx-small;
"><center>Site © 2013</center></a>
</div>


<div class="footer_links">
<a href="cgu.html" style="
color:#FFF;
font-weight:bold;
text-decoration:none;
font-size:xx-small;
">Conditions d'utilisation</a>
<a href="about.html" style="
color:#FFF;
font-weight:bold;
text-decoration:none;
font-size:xx-small;
">A propos</a>
<a href="help.html" style="
color:#FFF;
font-weight:bold;
text-decoration:none;
font-size:xx-small;
">Aide</a>
<a href="contact.html" style="
color:#FFF;
font-weight:bold;
text-decoration:none;
font-size:xx-small;
">Contact</a>
</div>

</footer>
</div>

CSS:

footer
{
position:fixed;
bottom:0;
height:45px;
width:100%;
background:url(Templates/footer1.png) repeat-x bottom;
}

.copyrights
{
float:left;
position:fixed;
bottom:17.5px;
text-decoration:none;
margin-left:8px;
}

.footer_links
{
float:right;
height:20px;
width:240px;
position:fixed;
bottom:17.5px;
text-decoration:none;
border:0px solid;
}

知道我该如何解决吗?我希望 .footer_links 转到我页面的右侧。

谢谢!克里斯。

最佳答案

取消您在 .footer-links 类中指定的位置 fixed

查看此 jsFiddle示例。

关于CSS - 无法将 div 发送到右侧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19319777/

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