- Joined
- Sep 26, 2005
- Messages
- 4,029
Hi everybody 
I have a simple example html page to test this with:
Now, if you run this page, you'll see that everything is lined up pretty well, but when make the browser thinner, the center div ends up going outside of it's container div.
I was wondering is there a way to keep fixed width divs within their container?
Any help is greatly appreciated
I have a simple example html page to test this with:
HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<div style="width: 100%; float: left;border:1px solid #000000;">
<div style="float: left; width: 185px;border:1px solid red;">left</div>
<div style="float: left; width: 790px;border:1px solid blue;margin:auto;">center</div>
<div style="float: left; width: 185px;border:1px solid green;">right</div>
</div>
</body>
</html>
I was wondering is there a way to keep fixed width divs within their container?
Any help is greatly appreciated