Log in

View Full Version : Floating div being pushed down incorrectly



bretlee
01-28-2009, 06:58 AM
I am trying to design my first custom (not kind of modified/hacked together) WordPress theme. I am using Starkers as my starting point. In the middle of the page, I have a div (cnt-mid-inner) which contains two other divs, cntin-cnt and cntin-side. cntin-cnt contains all the posts and stuff and cntin-side contains the sidebar. I want the sidebar to be at the right and the posts to be next to it on the left.

The problem is that the floated sidebar is below the posts. In other words, all the positioning is right, except that the sidebar is too low on the page.

Here is the css for the divs I mentioned and the footer:
Code:

/* cnt-mid-inner - main content holder */
#cnt-mid-inner{
border: 1px solid black; /* debug */
}

/* cntin-cnt - posts */
#cntin-cnt{
background: yellow;
margin-right: 200px;
}

/* cntin-side - sidebar */
#cntin-side{
background: red;
float: right;
width: 200px;
}

/* cnt-btm-footer - footer below cnt-mid-inner (main content) */
#cnt-btm-footer{
border: 1px solid black; /* debug */
clear: both;
}

Can any body able to solve.
Thanks

coothead
01-28-2009, 08:34 PM
Hi there bretlee,

unfortunately, you have not supplied enough information. :eek:

A link to the site will enable us to see the problem, first hand. ;)

coothead

Snookerman
01-28-2009, 08:53 PM
Don't bother, it's a spammer.

coothead
01-28-2009, 09:01 PM
I thought it was a he. ;)

How did you spot the little devil :D

coothead

Snookerman
01-28-2009, 09:11 PM
He posted four totally unrelated questions (css code probably just copied from somewhere) ending with spam links. I see admin removed the links but was nice enough not to ban him.