Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

My divs are being shrunk to 0 width

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have divs styled to be a certain width.



The contents of the divs are filled by a program. Sometimes these divs have no content. IE7 displays
them as I want - an 'empty' section of space of the specified width. IE8 and FF ignore the width, however,
and render the divs as 0px wide.

What do I do to force the empty divs to be displayed at the specified width?

If I put an   in the empty divs, they are rendered the way I want, but this is hokey.


 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I put an   in the empty divs, they are rendered the way I want, but this is hokey.


This is the only way.
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set a min-height of the div, that way IE8 and FF will render them...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic