How to arrange CSS Divs to float left and be relative Top to outer Div

I'm creating a weekly view of a calendar and need to have multiple inner divs in a column float left, but at the same time I need to set a top relative to the column and a height for each div.  See attached image for clarification.

The attached code is all absolute just to show what i need to achieve.
<div style="position:absolute; width:16%; top:5%; height:870px; background:blue;">
  <div style="position:absolute;background:gray; height:170.892857143px;top:0px; width:35%;">8:00AM - 11:00AM</div>
  <div style="position:absolute;background:white;left:35%; height:186.428571429px;top:31.0714285714px; width:35%;">8:30AM - 11:45AM</div>
  <div style="position:absolute;background:yellow;left:35%; height:77.6785714286px;top:248.571428571px; width:35%;">12:00PM - 1:30PM</div>
  <div style="position:absolute;background:yellow; height:77.6785714286px;top:248.571428571px; width:35%;">12:00PM - 1:30PM</div>
  <div style="position:absolute;background:yellow; height:62.1428571429px;top:792.321428571px; width:35%;  float:left;">8:45PM - 10:00PM</div>

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bjv211Author Commented:
Oops, sorry about the ridiculous pixel amounts, i forgot to round.
Hi bjv211,
Positioning does not work with floats

You can set your parent element to position:relative, then all the child divs to position absolute, this way their position will be relative to their parent not to the document.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.