开发者

Many &nbsp in the DOM, but none in the source

I need some help here: http://www.otojo.com/ is the site. If you scroll down to the article titled 'Latest Cyanogen nightly adds FM radio to Nexus One', you can see that the description went out of place in firefox. If you inspect it via Firefox addon, it shows a lot of &nbsp. But if you view its source, there's no &nbsp. Seems like firefox automatically added in the &nbsp, causing the layout to distort. I checked the source of the data, and th开发者_JAVA技巧ere's no &nbsp in there either.

Problem only in Firefox, not IE. Anyone has any idea?


There are Unicode non-breaking spaces in that page.

Running a hexdump of your page:

00009d00  a0 53 74 61 62 6c 65 c2  a0 73 68 6f 74 c2 a0 63  |.Stable..shot..c|
00009d10  61 6d 65 72 61 c2 a0 6d  6f 64 65 c2 a0 2d c2 a0  |amera..mode..-..|

Notice the c2 a0 where you would expect a 20 (space) to be? That's the Unicode NO-BREAK SPACE character in UTF-8, which is also representable as, you guessed it,  .


  is character code 160. Possibly whatever you're using to make that page is actually inserting that code into your page in place of spaces.


I'm pretty sure it's coming from your source. Go to the source page delete a few spaces and add them again. See if the problem goes away. If it does do it for the rest of the teaser.


Hmm, first of all, you should try to validate your html markup (here) - there's lots of errors which can cause firefox to behave seriously curious. I think searching for this specific error only makes sense when those "easy-to-fix"-errors are gone.


Newline (by pressing ENTER) also causes this problem. check whether any new line there

EDIT:

The problem is hyphen(-) which makes the sentence as single line .

replace following in your p tag its fine

In the latest “hack an FM radio onto that Android device” news, Cyanogen has added FM radio to the Nexus One. In the latest changelog of the Cyanogen nightly build, the notes state that the changes include:Common:Stableshotcameramode CyanogenCommon:Dual-modesnooze(longpressdismiss) EvanCharltonCommon:ComposeSMS/MMSviasearchbuttonlongpress WesGarnerN1:FMRadiosupport MIUI-http://miui.comN1/DS/Hero Slightlyb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜