Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-11-2009
Member
 
Join Date: Aug 2009
Posts: 59
Problem with 3 DIV

I have 3 div on the same line, which have the height that fits the content.

I would like to have all the div always have the same height, in practice the 2 div should take the height of the div with height greater.

How can I do?

HTML Code:
#body { 
float: left;
width: 924px;
background-color: white;
margin: 0 auto; 
padding: 0px;
text-align: left; 
}

#body { 
float: left;
width: 920px;
background-image: url(imm/body.jpg);
margin: 0 auto; 
padding: 12px 40px 12px 40px;
text-align: left; 
}

#body { 
float: left;
width: 24px;
background-color: white;
margin: 0 auto; 
padding: 0px;
text-align: left; 
}
Reply With Quote
  #2  
Old 04-11-2009
Member
 
Join Date: Nov 2008
Posts: 1,022
Re: Problem with 3 DIV

Do you have all the three div's inside a div that contains them? In such case, this container must adjust its height based on the contents of the div greater, and the two other div should resize the height of the container.
Reply With Quote
  #3  
Old 04-11-2009
Member
 
Join Date: Aug 2009
Posts: 59
Re: Problem with 3 DIV

Ok for the div container that fits better there, but I do not know how to adapt to the inner container.
Reply With Quote
  #4  
Old 04-11-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: Problem with 3 DIV

Its very simple. Just give them as height:100% or height:auto 100%. This will assign the full height to the div container where ever it is applied. Please note that I am not sure which one will work but try any of those since because one of the 2 should work.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #5  
Old 04-11-2009
Member
 
Join Date: Aug 2009
Posts: 59
Re: Problem with 3 DIV

I tried but that does not work, probably something wrong done by myself. These are the 4 div.

cont_body the container is 3 div (body_left, body and body_right).

HTML Code:
#cont_body { 
width: 968px;
background-color: red;
margin: 0 auto; 
padding: 0px;
}

#body_left { 
float: left;
width: 24px;
height: auto 100%; 
background-image: url(imm/shadow_s.jpg);
background-repeat: repeat-y;
margin: 0 auto; 
padding: 0px;
}

#body { 
float: left;
width: 920px;
background-color: white;
margin: 0 auto; 
padding: 12px 12px 12px 12px;
text-align: left; 
}

#body_right { 
float: left;
width: 24px;
height: auto 100%; 
background-image: url(imm/shadow_d.jpg);
background-repeat: repeat-y;
margin: 0 auto; 
padding: 0px;
}
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problem with 3 DIV"
Thread Thread Starter Forum Replies Last Post
Sony VGNCS3 laptop 15 inch screen problem...LCD or CHIP problem? Mick$Tyler Hardware Peripherals 5 31-10-2010 06:49 AM
Blackberry Tour Youtube problem/facebook and phone freezing problem Lohitaksha Portable Devices 6 27-07-2010 12:10 AM
hard disk problem, clicking sound and windows problem rajat_2589 Hardware Peripherals 1 16-06-2010 11:34 PM
Toshiba satellite L305D-S5893 shutdown problem or bios update problem Colter Portable Devices 4 10-04-2010 04:19 PM
Hyperlink Problem, Unable to Open, A security problem has occurred LaKisha MS Office Support 1 30-11-2004 11:57 AM


All times are GMT +5.5. The time now is 10:57 PM.