Welcome to WebmasterWorld Guest from 54.226.32.234

Forum Moderators: incrediBILL

Message Too Old, No Replies

why does firefox wrap on non breaking spaces?

     

ashman

1:37 pm on Jun 26, 2005 (gmt 0)

10+ Year Member



I have the following HTML output, note the &nbsp between the link and the image:

<td><a href="javascript:__doPostBack('GrdProducts$_ctl2$_ctl4','')">Dlvry</a>&nbsp;<img src=images/sort_asc.gif width=8 height=9 align=absmiddle><br></td>

I have always understood nbsp to stand for non-breaking-space. Correct?

So why would firefox 1.0.4 render the image below the text? I don't care that the column width may not be wide enough to fit the image - it should still adhere to my instruction to place the image on the same line! Surely?

Can anyone shed some light on this?

rocknbil

5:22 pm on Jun 26, 2005 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



<td nowrap>

:-)

It is confusing. &nbsp; does indeed mean non-breaking space, but that's not what it does. As you know browsers collapse white space, a dozen white spaces equals one in display. But &nbsp; forces whitespaces, so &nbsp;&nbsp;&nbsp; forces three white spaces.

treeline

10:20 pm on Jun 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Non-breaking space translates as non-collapsing space.
It does not mean no-line-return-now space.

Since the nbsp won't shrink, and the image plus the nbsp doesn't fit side-by-side in the column you are forcing them onto seperate lines.

Don't confuse line-break with space-break!

ashman

12:10 am on Jun 28, 2005 (gmt 0)

10+ Year Member



Thanks for the clarification. I was used to the way IE handled it, and assumed that was the correct way :(

CritterNYC

2:29 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Thanks for the clarification. I was used to the way IE handled it, and assumed that was the correct way :(

With differences, it is usually safe to assume that IE is handling it the incorrect way. ;)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month