你能告诉我应该使用什么语法来使页面右侧的“home,archives...”吗?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="loginform.css">
<title>Document</title>
</head>
<body>
<nav>
<img src="navbar.png"style="margin-left: 10px;" />
</nav>
<p>AUGUST 9, 2005, <time>5:04</time> PM EDT</p>
<h1>I'm hungry</h1>
<p>Strange. I seem to get hungry about the same time every<br> day. Maybe it's something in the water.</p>
<hr align="left" width="30%">
<p>AUGUST 6, 2005, <time>5:12</time> PM </p>
<h1>When's dinner?</h1>
<p>My gastric juices are gurgling...</p>
<p>I'll write more later!</p>
<div class="col-9 col-m-7">
<div id="konten">
<div class="col-12 col-m-12">
<ul id="menu" >
<li><a href="#">Home</a></li>
<li><a>Archives</a>
<ul>
<li><a href="#">August 2005</a></li>
<li><a href="#">July 2005</a></li>
<li><a href="#">may 2005</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
这是CSS代码
#konten{
padding:0px;
width:100%;
float:right;
font-size:13pt;
margin:30px;
}
谢谢!
找到将列表放在页面右侧的html代码。我已经尝试使用 css 但代码不起作用
下次请尝试发布与该问题有关的所有代码,
你需要将你想要并排的代码放在一个容器中,然后通过在css中添加
display: flex
将容器变成一个flexbox,
确保你想要放在右边的东西在它自己的容器里 你想放在左边的东西在它的容器里
.container{
display: flex; /*set the disp-lay of the cotainer to flex*/
}
the logo of your pa
<br>
<br>
<div class="container"> <!-- create a container div -->
<div> <!-- this will act as the conainer for the stuff that will be on the left -->
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
the other stuff you have on your page <br>
</div>
<ul id="menu" > <!-- this will act as the container for the stuff that will be on the right -->
<li><a href="#">Home</a></li>
<li><a>Archives</a>
<ul>
<li><a href="#">August 2005</a></li>
<li><a href="#">July 2005</a></li>
<li><a href="#">may 2005</a></li>
</ul>
</li>
</ul>
</div>