Currently, I am learning HTML and CSS. My goal is to create a simple layout with a header, menu bar, navigation bar on the right side, and main section also on the right side. However, I am facing difficulty in aligning the navigation bar and main section next to each other.
The main section keeps appearing below the navigation bar instead of alongside it.
Here is the code snippet I am using:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<center>
<div style="height:70px; width:800px; background-color:red; color:white; font-size:30px" align="center">
<strong>WELCOME</strong>
</div>
<div style="height:30px; width:800px; background-color:blue; color:white; font-size:15px; top:80px" align="center">
<div style="width:200px; float:left">
<a href="">HOME</a>
</div>
<div style="width:200px; float:left">
<a href="C:\Users\Harish\Desktop\c prog.html">liwjoejlsn</a>
</div>
<div style="width:200px; float:left">
<a href="">lskdjflsd</a>
</div>
<div style="width:200px; float:left">
<a href="">ABOUT</a>
</div>
</div>
</center>
<center>
<div style="height:800px; width:800px; background-color:grey; color:white; font-size:10px; top:100px">
<div style="height:800px; width:200px; float:left; border-style:solid; border-width:2px;">
<ul>
<li>Hello</li>
<li>hey</li>
<li>who is</li>
<li>forgive</li>
</ul>
</div>
<div style="height:800px;width:600px; float:left; border-style:solid; border-width:2px; left:200px;">
<p>
lsjdgfio jsldfkslj;do fsmi;odfml dsijfo siuldhf iofj s dofus <br> klsjhdfioy oasdilufilh aoudsfk <br;> ksajhkdfjhu aosls
</p>
</div>
</div>
</center>
</body>
</html>