Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> IE And It's Annoying NBSP (Non-Breakable Space), How to stop it
twitch
post May 29 2006, 07:02 PM
Post #1


Veteran Nut
Group Icon

Group: Members
Posts: 527
Joined: 4-October 05
From: UK
Member No.: 8,895



Fellow designers, developers and table makers. This is a short explanation and tutorial on problem-child Internet Explorer's urge to fill empty div or table tags with a non-breakable space (html char code   ).

Why does IE put NBSP into empty div/table tags?
Here comes a really professional answer. I don't know why. Surely it takes that bit longer to put a conditional statement that if there is an empty tag, fill it with somet. Surely, it would be easier to say don't fill. But then again, MS never do things by half.

The Work Around
There may be a Javascript or even more simpler way than doing it this way, but so far I have not come across it. The only way to stop IE from rendering the div or table to the height of the text in which it contains (if it is empty, MS puts in a non-breakable space, therefore renders at the size of the body text) is to create a 1px*1px GIF with an index transparency of white and the background of white. This makes it a clear square. It is still classed as an object, so by putting <img src="images/clear.gif" alt="" height="1px" width="1px" /> it renders whatever div/table cell at whatever height you specify (below the body text size).

If you don't want that div or table/cell to be rendered, then it is even easier, use CSS and set whatever element it is to display: none;
Go to the top of the page
 
+Quote Post
nightfox
post Jun 1 2006, 01:28 AM
Post #2


NiGHTFoX - Hiding in the dark
Group Icon

Group: Members
Posts: 680
Joined: 3-April 05
Member No.: 3,584



Hmm...
normally I just use a transparent gif anyways and just fill the cell (usually keeping the gif's height 1 px). I find that this way, the design keeps its proper shape in ALL or MOST browsers. Normally, browsers won't go crazy if it can't move the object. But I ALWAYS suggest filling empty space with a transparent gif. They work perfectly as a "brace" to keep it all together. wink.gif

[N]F
Go to the top of the page
 
+Quote Post
iGuest
post Jun 13 2008, 09:39 PM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



How can I stop IE from inserting this- ( ) -into an email that I\\
IE And It\'s Annoying NBSP (Non-Breakable Space)

Replying to twitch

Does anyone know why this is happening and how I can stop it.

How can I stop IE from inserting this- ( ) -into an email that I'm typing in yahoo

Any info would really help
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Stop anything from making it ur homepage!(52)
  2. Meta Tags(17)
  3. Stop AUTO_INCREMENT From Jumping(13)
  4. Bad_pool_header(8)
  5. Google Webspace(21)
  6. My Theory Of Betting(10)
  7. Worst "trojan" Ever And It Takes Over Iexplore(15)
  8. Space Exploration (nasa= Good/bad)(33)
  9. Space Rangers (1/2)(4)
  10. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  11. Space Tools(5)
  12. Astahost Forums Now Ads Free!(40)
  13. Stop Smoking, Save Thousands!(51)
  14. Qupis : Free Cpanel Web Hosting (one Line Text Ad At Bottom)(10)
  15. Astahost Hosting Plan Upgrades To Offer Even More!(43)
  1. Game: Stop Stop -> How Timely Are You?(6)
  2. No Internet(6)
  3. Free Hosting - 15gb Space - 250gb Bw(42)
  4. A Gaiaonline Problem(9)
  5. Newsit Web Host Review(4)
  6. 10 Extremely Useful Websites To Stop Big Brother From Snooping On You(5)
  7. Eve Online(1)
  8. Annoying Virus!(5)
  9. Opensuse: Stop Asking Root Password(5)
  10. More Space?(5)
  11. Space Needed For Database(10)
  12. Stop Hold Of Hosting Credits(2)
  13. Disable Annoying Information Bar In Ie(5)


 



- Lo-Fi Version Time is now: 6th September 2008 - 06:31 PM