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.

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.