Dynamic Height of the div

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
7/28/2010 3:01:35 AM
Gravatar
Total Posts 2

Dynamic Height of the div

Hi everyone,

I need a div that have a dynamic height according its content. The background color div is different from the background color of the page.

If i do not insert any height at the div in the css, when i render the page, the height of the div will be 0px, and I do not see it. I think because of the control are loaded runtime.

If I use min-height or height the div, the div will be too long or too short when i render the page.

The markup of the layout.master is:

<div id="wrapwebsite">

          ....

          <div id="wrapcenter">

                        ....

                        <asp:Panel id="divLeft" runat="server" cssclass="leftside" visible="True" >
                               ...

                        </asp:Panel>

                        ...

          </div>

</div>

wrapcenter is the problematic div!

 

Thanx in advance

8/26/2010 9:48:24 AM
Gravatar
Total Posts 2172

Re: Dynamic Height of the div

Hi,

Sorry for the delayed response. Every once in a while something slips through the cracks.

Try adding the following directly before the closing </div> for the wrapcenter.

<br class="brclear" />

and add this to your style.css

.brclear{
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}

HTH,
Joe D.

You must sign in to post in the forums. This thread is closed to new posts.