Jump to content

setting up height parameters correctly with <div>


pioneerx01

Recommended Posts

I have the following CSS:

 

#ifr_r10 {
overflow:hidden;
padding-bottom:2px;
}
#ifr_c10 {
float:left;
width:250px;
font-weight:bold;
text-align:right;
background-color:#CCCCCC;
padding:5px;
}
#ifr_c11 {
float:left;
width:500px;
padding:5px;
background-color:#FFFFCC;
}

 

and hollowing HTML code:

 

echo "<div ID='ifr_r10'>";
echo "<div ID='ifr_c10'>";
 echo "Title";
echo "</div>";
echo "<div ID='ifr_c11'>";
 echo "$row[title]";
echo "</div>";
echo "</div>";

 

Sorry about the ugly colors in CSS, but they are there to help me see things better :) The ifr_c10 is always a one line, but sometimes ifr_c11 becomes two lines. However when ifr_c11 is two lines in height, the ifr_c10 remains only one line in height. With use of background colors there is a white gap under ifr_c10 if ifr_c11 is two lines tall.

 

How do I adjust the CSS so the heights of both ifr_c10 and ifr_c11 are identical.

Edited by pioneerx01
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.