Monday, May 8, 2006

Those Pesky Nonbreaking Spaces

Okay folks, so I've done up a draft entry on the HTML tags that you can use in Journal entries. I've sent it to the Journals tech folks so they can review it (to make sure I'm not passing along any misinformation). So I'll probably be publishing it tomorrow.

In an HTML-related note, Journaler Bill wrote in to me about a problem he was having with his Journal, Comments on the Events of My Life; it seems as if something was causing a red border to intrude on the main part of his entry area:

Red Border

See that red border? Not supposed to be there.

I took a look at Bill's blog and did a right-click to "View Source" (which shows you the HTML of the page) and started looking around.

Since it only affected his main page, not any of the archive pages or individual entry pages, that kind of narrowed it down -- since you can type stuff in entries or your All About Me, it really only left his "All About Me."

Here's the relevant bit of the HTML code for that section:

HTML showing the Nonbreaking spaces

I highlighted the suspicious part.

Apparently, there were a bunch of nonbreaking spaces (all those  ) below his picture and above his "Bill" caption.

Since nonbreaking spaces (by definition) don't break to the next line, they ended up pushing the border of his All About Me area out to the right, into the main entry area, causing that red border effect.

Since then, Bill has fixed it by deleting those nonbreaking spaces, so we're all good.

HTML is kind of frustrating in that sometimes it displays in unexpected ways -- that is, it does what you tell it to do, not necessarily what you want it to do.

Anyway, more on HTML tomorrow. Also, don't forget to Send in your Blog Six-Pack Picks!

Thanks - Joe

Tag: , ,

3 comments:

Anonymous said...

I'm glad you explained this because I know zero about HTML.
Dianna

Anonymous said...

I've found that All About Me does this same thing another way....whenever I put an image in the section that is larger than 135 pixels in width, which becomes annoying sometimes because not everything looks good at 135 pixels wide. When using custom colors, the width becomes 130 pixels, with anything larger creating a white tab-looking space in the area where it says "All About Me", which is not attractive, IMO. Just thought you'd like to know, Joe! :-)

Anonymous said...

Have you got Flat Scalzi yet?