|
|
|
|
![]() ![]() |
May 29 2006, 07:02 PM
Post
#1
|
|
|
Veteran Nut 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; |
|
|
|
Jun 1 2006, 01:28 AM
Post
#2
|
|
|
NiGHTFoX - Hiding in the dark 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. [N]F |
|
|
|
Jun 13 2008, 09:39 PM
Post
#3
|
|
|
Newbie [ Level 1 ] 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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th September 2008 - 06:31 PM |