Jump to content

How do you make an empty div render without nbsp or setting dimensions?


tibberous

Recommended Posts

First, the DOM will show the div. But, I'm guessing you have only given it a height, which means the div may be 1 million pixels high, but you will never see it if its width is a 0. Trying giving it a width or a min-width.  :D

 

What are you talking about? Divs are native block elements, which means you NEVER have to set width unless you're overriding it or are using it positioned.  Furthermore, your post further has no relevance to the OP.

Link to comment
Share on other sites

@ floridaflatlander:

 

my apologies for not being clearer (or maybe you are just being clever ;)).

 

anywho, to be abundantly clear to other readers, i meant "Agreed."  as in i agree with floridaflatlander's statement.  without more information, i would say giving a height, or more precisely, a min-height would be the best start.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.