What’s wrong with my divs?

I’m trying to make a page with a header, a footer, and two horizontally-aligned columns in between (left=80%, right=20%). The middle columns won’t line up correctly though, it’s one under the other, but they’re on their right sides (left is on the left, right is on the right, but right is under left on the right).

Here’s my divs:

<div id="header">
<font color="#dddddd" face="arial" size="5"><b>GODblog</b></font>
<a href="feed.xml" alt="Subscribe"><img src="imgs/subscribe.gif" border="0"></a>
<br><font face="times new roman" size="2"><i>Overheard in AA</i></font>
<p>
</div>

<div id="container">
<div id="row">

<div id="left">

<p><b>Saturday, October 18, 2008</b>
<font size="1"><a href="javascript:HaloScan(’oct18_2008′);" target="_self"><script type="text/javascript">postCount(’oct18_2008′);</script></a></font>
<br><font face="arial" size="2">
There’s a correlation between honesty & your motives.
</font>

<p><b>Friday, October 17, 2008</b>
<font size="1"><a href="javascript:HaloScan(’oct17_2008′);" target="_self"><script type="text/javascript">postCount(’oct17_2008′);</script></a></font>
<br><font face="arial" size="2">
The universe applauds symbolic acts.
</font>

<p><b>Thursday, October 16, 2008</b>
<font size="1"><a href="javascript:HaloScan(’oct16_2008′);" target="_self"><script type="text/javascript">postCount(’oct16_2008′);</script></a></font>
<br><font face="arial" size="2">
Change what you can change, and change your mind about the rest.
</font>

</div>
<div id="right">

<b>Recovery Corner</b>
<p><a href="http://aa.org" target=_"new">Alcoholics Anonymous</a>
<a href="http://na.org" target=_"new">Narcotics Anonymous</a>
<a href="http://oa.org" target=_"new">Overeaters Anonymous</a>
<a href="http://something-fishy.org" target=_"new">Something Fishy</a>
<a href="http://12step.org" target=_"new">12 Steps</a>

</div>

</div>
</div>

<div id="footer">
<p><br><p><center><a href="http://www.freedomain.co.nr/" target=_"new"><img src="imgs/fdconr.gif" width="88" height="31" border="0"></a></center>
</div>

and here’s my stylesheet:

<style type="text/css">

<!–
body{

margin: 0px;
padding: 0px;
}

#header {
background: #fff;

width: 100%;
}

#container {
display: table;
}

#row {
display: table-row;
}

#left, #right {
display: table-cell;
}

#left {
background: #fff;

float: left;

width: 80%;

margin: 20px;
}

#right {
background: #fff;

float: right;

width: 20%;
}

#footer {
background: #fff;

clear: both;

width: 100%;
}
–>

</style>

I think I have some sort of inkling of what could be wrong, but I don’t know how to fix it and configure it the way I want… This has got to be so simple, please someone help me?

hello, i dont know if my answer will solve your problem but just try and see.

before your <head> tag, put this:

<!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" dir="ltr" lang="en">

One Response to “What’s wrong with my divs?”

  1. Destiny's Child Says:

    hello, i dont know if my answer will solve your problem but just try and see.

    before your <head> tag, put this:

    <!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" dir="ltr" lang="en">
    References :

Leave a Reply