Hey. I am new here so sorry if this is in the wrong place.
I am just starting to learn html and css and I was following some tutorials, in the tutorials they made a 2 column website but on column doesn't work properly and they didn't show how to fix it in css. So I was wondering if someone could help me?
The right column goes out of the white content area when you add things to it.
I wanted it so it expands and says in the content area like the main content does.
My CSS code.
body {margin 0px; font-family: Arial, Helvetica, sans-serif; background-color: #eeeeee; color: #333333;}
div#banner {margin-left: 25%; margin-right: 25%; width: 50%; border: 1px solid #cccccc; text-align: center; background-color: #ffffff; margin-top: 25px;}
div#menu {padding-top: 10px; padding-bottom: 10px; margin-left: 25%; margin-right: 25%; width: 50%; border: 0px solid #cccccc; text-align: center; background-color: #ffffff; margin-top: 0px;}
div#content {padding-top: 10px; padding-bottom: 10px; margin-left: 25%; margin-right: 25%; width: 50%; border: 1px solid #cccccc; text-align: center; background-color: #ffffff; margin-top: 10px;}
div#main {width: 65%; margin-right: 25%; padding-bottom: 10px;}
div#right {width: 45%; float: right; border-left: 1px solid #cccccc; padding-bottom: 10px;}
My html code.
<html>
<head>
<title>ChrisOliver</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="banner"><img src="images/logo.png" /> <br> Home | About | Blog | Media | Contact </div>
<div id="content">
<div id="right"><h1>right</h1>
<br>
RIGHT
</div>
<div id="main"><h1>Main</h1></div>
</div>
</body>
</html>
Thanks in advance.