Please help me find the html codes to put the list on the right side of the page. I already tried to use css but the code doesn’t work
Can you tell me what syntax i should use to make the "home,archives…" to the right side of the page.
I made this one
#konten {
padding: 0px;
width: 100%;
float: right;
font-size: 13pt;
margin: 30px;
}
<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>
2
Answers
youn need to put the code that you want to be side by side in a container, then turn the container into a flexbox by adding
display: flex
in css,make sure that the stuff you want to be on the right is in its own container
and the stuff you want to be on the left is in its on container.
if you want to add space between the 2 containers (the left and right containers) add this css to conater class
justify-content: space-between
this will put the elements on opposit endsjustify-content: space-around
this will add equal space around the containersif you wan just a bit of space this css will help
It looks as if you might be using Bootstrap. If that’s the case, place the following in the
<head>
The most basic layout you’ll use with Bootstrap is as follows:
".row"
tags.".col-*"
tags.*
is a number in the range of 1 to 12.Example A
Example B