Forum Moderators: not2easy

Message Too Old, No Replies

div's and boxes

question about the properties of boxes

         

chris832

1:56 pm on Feb 13, 2010 (gmt 0)

10+ Year Member



i apologize in advance if this is a dumb question but i know just enough about this stuff to be dangerous. i'm going to paste the html and the CSS i used below. i took out the content and just left the basics of what my question is about. basically i have three div's. one is content and i have left and right boxes inside it. the question is if i apply a border to the content div shouldn't it wrap around the left and right div's ? instead it stops above it. there are other boxes above and below but i have taken them out to test it and it works the same with or without them. if you want to see the whole site its at <snip>.

<!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 name="description" content="example" />
<meta name="keywords" content="example" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="" />
<meta name="Robots" content="index,follow" />
<link rel="stylesheet" href="example.css" type="text/css" />
<title> example Inc</title>
</head>
<body>
<div id="container">
inside the container <br />
<div id="left">
left side
</div>
<div id="right">
right side
<!--right div--></div><!--right div-->
<!--container div--></div><!--container div-->
</body>
</html>

[edited by: limbo at 12:40 pm (utc) on Feb 14, 2010]
[edit reason] No URL's please, see TOS [webmasterworld.com] [/edit]

limbo

12:44 pm on Feb 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi chris832

Welcome to WebmasterWorld [webmasterworld.com] :)

If you haven't done so already ensure your pages are valid CSS [jigsaw.w3.org]/HTML [validator.w3.org] and that you have included a CSS [developer.yahoo.com] reset in your document head.

If there's still a problem then strip your CSS down the bare basics too and we'll have another look.

A small tip for debugging layout issues. Add background colours to all the containers in question. This will help you identify which ones are playing ball, and those that are acting up.