need help with html! (Spaces in text)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to cheat and take a word document and save as html., and
then edit the resulting html to be cleaner.

We have several documents that contain a header of information
(department, process owner, etc...)

It's like..

"Document# 123456789                             Owner: Jimbo Jones"

Saving the doc as html puts the owner piece that should be over on the
right side, under the Document... line.

I know most browsers take multiple  's and collapse them into
one..  What could I do to make sure they appear as we want them to
appear in the user's web browser?

Any suggestions?


Re: need help with html! (Spaces in text)

Quoted text here. Click to load it

You're going a lot of cleaning to do.
Quoted text here. Click to load it

No,   is a Non-Breaking Space so a browser will NOT collapse multiple
  into one.  

Quoted text here. Click to load it

Adrienne Boswell
Please respond to the group so others can share

Re: need help with html! (Spaces in text)

Quoted text here. Click to load it

Actually if you use the cleaner that Microsoft (!) offers, it can be rather
easy - if the Word document was well-written. If you used Word's "style"
features, as you should have, the cleaner even converts them to class
attributes and associated style sheets. The cleaner is available at
Quoted text here. Click to load it

Right, most don't. They are surely not required to. It is explicitly left
undefined (in HTML specifications) what browsers do with a sequence of
no-break space characters.

The simple approach to the problem is to put those texts into a table, with
width="100%" and with the second cell right-aligned. That would be a rather
harmless case of using a table for layout.

The modern approach to the layout problem would be to put the pieces into
two <div> elements and uses CSS to float the first to the right, the second
to the right, and use clear: both for the element right after them.

The simplest approach is probably to stop trying to imitate the visual
appearance of the Word document. There's little reason not to put those
pieces of information into two separate lines (or <div> elements),
especially since they are actually rather different pieces of information.

Yucca, /
Pages about Web authoring:

Re: need help with html! (Spaces in text)

Quoted text here. Click to load it

One way is to use a table:

<table width="100%">
<td>Document# 123456789</td>
<td align="right">Owner: Jimbo Jones</td>

Alan Wood (Unicode, special characters, pesticide names)

Site Timeline