WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > Dynamic height for a div element

Reply
  Thread Tools Display Modes
Old 6th June 12, 12:38 PM   #1
davide
WLC Member
 
Join Date: Jun 2012
Posts: 2
Default Dynamic height for a div element

Hi,
My html form include divs, container div and inner divs. The main inner div contain asp web controls and asp validators. The container div don't have height because its height changes when there is errors and the validators apears. On the right side and left side of this div there is another div which has background image. those divs used like a border. The problem is that I can see those border just if I give a specific height like 200px so it can not be dynamic and if an error ocuurs and the height of the main div changes, those borders' height doesn't change. I tryed to set the height to auto, to 100% or to delete the height but if i do so I see nothing.
Here the html:
<div class="boxForm" >
<div style="display:table-row-group ">
<div id="line_r" class="rightLine"></div>
<div id="gd_form" class="form">
controls here....
</div>
<div id="line_l" class="leftLine"></div>
<div class="downLine"></div>
</div>
</div>


Here the css :

.boxForm
{
width:647px;
/*height:550px; */
float:right;
background-color:#ffffff;
margin:0px 106px 0px 0px;
}


.rightLine
{
width:8px;
/*height:550px;*/
float:right;
background-image:url(../images/Forms/rightLine.png);
background-repeat:repeat-y;
}


.form
{
width:580px;
/*height:550px; */
float:right;
text-align:right;
margin: 0px 30px 0px 0px;
font-size:12px;
font-weight:bold;
}

.leftLine
{
width:8px;
float:left;
/*height:550px;*/
background-image:url(../images/Forms/leftLine.png);
background-repeat:repeat-y;
}

.downLine
{
width:647px;
height:19px;
float:left;
background:url(../images/Forms/downLine.png);
background-repeat:repeat-y;
}


Thanks,
David
davide is offline   Reply With Quote
Old 6th June 12, 06:04 PM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: Dynamic height for a div element

Clear the floats!
chrishirst is offline   Reply With Quote
Old 7th June 12, 09:57 AM   #3
davide
WLC Member
 
Join Date: Jun 2012
Posts: 2
Default Re: Dynamic height for a div element

Thanks but it doesn't help
davide is offline   Reply With Quote
Old 7th June 12, 10:14 AM   #4
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: Dynamic height for a div element

Let's see the document URI in that case. as anything else is just guessing.
chrishirst is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:32 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.