Html 我的网站&x27;侧边的内容在页脚下
我在边上做了一些内容,应该是重叠的,但不超过页脚,比如页面应该更长,所以说它不是。我真的不知道该怎么说,但我想把侧面板/最近的新闻拖下来,然后当Html 我的网站&x27;侧边的内容在页脚下,html,css,Html,Css,我在边上做了一些内容,应该是重叠的,但不超过页脚,比如页面应该更长,所以说它不是。我真的不知道该怎么说,但我想把侧面板/最近的新闻拖下来,然后当最近的新闻结束时,页脚在右下角 我的HTML代码 <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8">
最近的新闻
结束时,页脚在右下角
我的HTML代码
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.css">
<title>EcoNews</title>
</head>
<body>
<header>
<a href="#"><img class="logo" src="assets/img/icon.png"></a>
<a href="#"><h1>EcoNews</h1></a>
<nav>
<ul>
<li><a href="#">News</a></li>
<li><a href="#">Tips</a></li>
<li><a href="#">Donate</a></li>
<li><a href="#">Partners</a></li>
<li class="dropdown">
<a href="#">Account</a>
<div class="dropdown-content">
<a href="#login">Login</a>
<a href="#signup">Signup</a>
</div>
</li>
</ul>
</nav>
</header>
<aside>
<div class="container recent-news">
<ul>
<li class="article">
<h1>Title of news page</h1>
<p>Lorem ipsum dolor sit amet consectetodit</p>
<img src="assets/img/icon.png">
</li>
<li class="article">
<h1>Title of news page</h1>
<p>Lorem ipsum dolor sit amet consectetodit</p>
<img src="assets/img/icon.png">
</li>
<li class="article">
<h1>Title of news page</h1>
<p>Lorem ipsum dolor sit amet consectetodit</p>
<img src="assets/img/icon.png">
</li>
</ul>
</div>
</aside>
<footer>
<h2>EcoNews</h2>
<ul>
<li>
<a href="index.html">Home</a>
</li>
<li>
<a href="#">Recent News</a>
</li>
<li>
<a href="#">About</a>
</li>
</ul>
</footer>
</body>
</html>
试试这个
footer{ clear: both; }
如果你能发布整个html标记,那就太好了。我建议您在网站布局中使用flexbox我如何在我的网站中使用flexbox,您是否可以提供任何文档或示例?现在我将用整个HTML标记和css代码编辑我的帖子试试我给你的代码,让我们知道它是否对你有用。你的代码没有任何作用,先生,有什么建议吗?对不起,我已经离线一段时间了。你还面临这个问题吗?
footer{ clear: both; }