Jump to content

Div wont match up with the other div (float)


id

Recommended Posts

Hello,

 

Im making a forum board and in my view_topics.php page, the layout is the basic....

 

In one big DIV is : title, published date, then its a float left (user content), then a float right (actual content). While I want the user content height to match with the actual content height.

 

Example: The user content have a background, and i want it to match the actual content. So if the actual content height is 600px; then i want the user's content height to be 600px;. I assume that a min-height would work, if i gave both user content and actual content the same height index, but it doesn't and im stuck.

  • 2 weeks later...

Since you do not know the exact height you can not do this without a trick like Faux Columns, or tables. You can also play with display properties like

display="table-column"

Or you can use Javascript with jQuery.

     $("#div1").height($("#div2").height());//set the height of #div1 to the height of #div2

 

If needed I can give out a better example code later.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.