misaligned divs and mysterious indents
Date: 06/15/05
(WebDesign) Keywords: html, web
Hi, I've been reading/commenting for a while, but this is my first post.
On my website
the content is divided into columns (and a header) using divs. Each
column is subdivided into sections to manage the content. For some
unknown reasons, the first few lines in the middle column are indented,
aligned with a div in the header and a div in the righthand column.
Here are the relevant bits of code:
#title {
border:1px solid #F6B33D;
margin:5px;
padding:5px;
text-align:center;
height:190;
width: 1000px; /* the columns are in a 1000px wide container div */
}
#middle {
margin:0px 200px 0px 200px;
padding:2px;
border:1px solid #F6B33D;
position: relative;
top: 83px;
bottom: 10px;
}
#left {
margin:0;
margin-right: 0;
padding:3px;
width:170px;
border:1px solid #F6B33D;
position:absolute;
top:220px;
left:15px;
overflow:hidden;
}
#right {
margin-top: 200px;
margin:0;
padding:3px;
width:170px;
border:1px solid #F6B33D;
position:absolute;
top:220px;
right:15px;
overflow:hidden;
}
/* centres the divs within each column */
.centerContent {
text-align: left;
border: 1px solid F6B33D;
/*border-left: 10px solid #000;
border-right: 10px solid #000;
border-bottom: 10px solid #000;*/
margin: 0px 0px 0px 0px; padding: 10px 5px 10px 5px;
background: #23272b;
}
/* centres the title of each div in each column */
.centerTitle {
text-transform: lowercase; font-family: Arial, helvetica;
color: #F6B33D; background: #000;
margin: 0px 0px 0px 0px; padding: 2px 2px 2px 10px;
letter-spacing:5px; text-align: left;
font-weight: bold;
}
disp('shortdesc', 'htmlbody'); ?>
">disp( 'name', 'htmlbody' ) ?>
>> disp( 'tagline', 'htmlbody' ) ?>
WTF?
disp('longdesc', 'htmlbody'); ?>
I don't see where the problem could be. The w3.org html validator
didn't pick up any mismatched divs, and I was sure there weren't
anyway. This is starting to really frustrate me and I don't want to
start over. Sorry if the code is too much, I tried to minimise it.
Please help. :(
Source: http://www.livejournal.com/community/webdesign/905252.html