need help with html! (Spaces in text)

T

Tony!

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?

Tony!
 
A

Adrienne

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

You're going a lot of cleaning to do.
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?

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

Alan Wood

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

"Document# 123456789 Owner: Jimbo Jones"

What could I do to make sure they appear as we want them to
appear in the user's web browser?

One way is to use a table:

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

Jukka K. Korpela

Adrienne said:
You're going a lot of cleaning to do.

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
<http://www.microsoft.com/downloads/details.aspx?
FamilyID=209ADBEE-3FBD-482C-83B0-96FB79B74DED&displaylang=EN>
No, &nbsp; is a Non-Breaking Space so a browser will NOT collapse
multiple &nbsp; into one.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,220
Latest member
AugustinaJ

Latest Threads

Top