I have a website layout with 4 main sections: header, left side, right side, and footer. I would like to further divide the header into two sections - left header and right header. The right header should contain an image along with other options like home and about us, while the left header should display text.
How can I achieve this using HTML and CSS? Below are snippets of the HTML and CSS code:
<html>
<head>
<title>Search Engine Title Goes Here</title>
<link rel="stylesheet" type="text/css" href="style1.css">
</head>
<body>
<div id="container"> </div>
<div id="header">
<div id="header-left-container">
<h1>heading1,<br> heading2 and <br>heading3</h1>
</div>
<div id=header-right-container>
<img border="0" src="tra.jpg" alt="drug"align="right" width="750" height="150">
</div>
</div>
<div id="sidebar"> Left </div>
<div id="content"> <p></p></div>
<div id="footer"> </div>
</body>
</html>
CSS code:
body {background: #ffffff; margin: 0; padding: 0;}
a {color: #2b2bf6;}
#container
{width: 900px;
margin: 0;
padding: 0;
background: #dddddd;}
#header
{width:1000;
height: 150px;
margin: 0;
padding: 0;
border: 0;
background: #FFFFA3;}
#sidebar
{width: 200px;
height: 400px;
margin: 0;
padding: 0;
border: 0;
float: left;
background: #f0e811;}
#content
{width: auto;
height: 400px;
margin: 0;
padding: 0;
border: 0;
float: left;
background: #8be0ef;}
#footer
{width: auto;
height: 70px;
margin: 0;
padding: 0;
border: 0;
float: left;
background: #000000;
clear:both;}
As a beginner in web design, I appreciate your kind cooperation and guidance.