Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Hide Empty DIV s?Hide Empty DIV s?
Previous
 
Next
New Post
4/11/2009 10:36 PM
 

I will start this thread in the same way as many before it.....

IT WORKS IN FIREFOX, BUT NOT IN IE.

I am working on a table-less css skin using DIV's to control the structure. In the days of table layouts empty cells collapsed completely when they didn't have content.

So in the past, I would set up 3 columns 33% each, then a content pane below it....if i didn't put anything in the any of the columns the entire row would collapse and hide (vice versa with the content pane)

Now with CSS my empty DIV's are remaining visible ...about 25px tall.

Does anyone know how to hide empty DIV's in IE, I get the same results in IE 6, 7 and 8.

would apprecieate any help available.

Thanks,

John

 
New Post
4/12/2009 3:04 AM
Accepted Answer 

Set style="font-size:0" for the divs. IE reserves space for text even when none is present. It does the same with tables.

And a related note... a div used as a content pane should vanish when no module is present in the pane.

Rob

 
New Post
4/12/2009 11:29 AM
 

Setting the font size to zero got the pane to collapes to about 3px. It is still not collapsing completely.

I think this will work for now.

Thanks,

John

 
New Post
4/12/2009 4:14 PM
 

For ascx files, if you are working with panes, the best way is to add visible=false. For instance:

< div id=”ContentPane” runat=”server” visible=”false” >< /div >

less the extra spaces

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Hide Empty DIV s?Hide Empty DIV s?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out