Can paragraph alignment be turned off?

B

Barbara White

Using Word XP on Windows XP.

We are using Dreamweaver 8.0 on Windows XP and on the Mac.

When we import Word files into Dreamweaver 8.0, the HTML reflects the
alignment of paragraphs such that left-aligned paragraphs (in Word)
become <p align="left"> (in the imported Dreamweaver HTML).

The same is true of right/center/justified-aligned paragraphs (they
become <p align="right/center/justified"> in the imported Dreamweaver HTML).

In Word, it seems as though you must choose alignment for paragraphs. I
cannot find a way to set paragraph alignment to be anything other than
left, right, center, or justified.

I know that, in the Dreamweaver code, we can simply do a search/replace,
but we'd like to avoid that if possible and find a way to import
paragraphs into Dreamweaver as <p> (sans alignment flags).

Is there a way to avoid having to designate paragraph alignment in Word?

Thanks.
Barbara
 
B

Barbara White

Stefan said:
Use paragraph styles to format text in Word. Then, no align attributes
should be added.

I should have said that we are using Styles already.

I don't know how to have Word do anything but default to Left alignment
for Styles.

(If I create a new Word Style and then examine the paragraph attributes
page, 'Left' is selected by default/automatically. Then, when I bring
that Word file into Dreamweaver and in the HTML that Dreamweaver
produces, the paragraphs that use that Style are formatted to have left
alignment.)
 
R

Robert M. Franz (RMF)

Hello Barabara

Barbara said:
Using Word XP on Windows XP.

We are using Dreamweaver 8.0 on Windows XP and on the Mac.

When we import Word files into Dreamweaver 8.0, the HTML reflects the
alignment of paragraphs such that left-aligned paragraphs (in Word)
become <p align="left"> (in the imported Dreamweaver HTML).

The same is true of right/center/justified-aligned paragraphs (they
become <p align="right/center/justified"> in the imported Dreamweaver
HTML).

In Word, it seems as though you must choose alignment for paragraphs. I
cannot find a way to set paragraph alignment to be anything other than
left, right, center, or justified.

Yes, as long as a paragraph is in a normal Word document, it always has
an alignment property. _But_: I only see it in Word-generated HTML code
(Word 2003 here) when the alignment has been set through direct
formatting (it's not "there" in the para itself when you define it
through a style -- it's in the style definition at the top of the HTML
code, of course, but not in the <p> tag.

So, how exactly are you importing into DW?

Greetings
Robert
 
S

Stefan Blom

It seems as if the import into Dreamweaver is the problem, then,
because if you save a Word file into HTML format, no align attribute
is added to paragraphs.
 
B

Barbara White

Robert said:
Hello Barabara

Hi, Robert...
So, how exactly are you importing into DW?

I believe that, from Dreamweaver, we're doing File > Import > Import
Word. We also are using Edit > Paste Special... (from within
Dreamweaver). It's this last route (Edit > Paste Special) that most of
our users will probably use to get Word files into HTML via Dreamweaver.

I am thinking that Stefan is right in that this is probably something
that should be controlled from within Dreamweaver v. from within Word. I
only wanted to be sure that, in Word, there isn't some
obvious-to-everyone-except-me :) feature that allows users to turn off
default paragraph setting.

I'll check it out more from within Dreamweaver and will post here after
I do that.

Thanks, Stefan & Robert.
 
R

Robert M. Franz (RMF)

Barbara said:
I believe that, from Dreamweaver, we're doing File > Import > Import
Word. We also are using Edit > Paste Special... (from within
Dreamweaver).

And (apparently) in both cases, DW "resolves" the paragraph property
(whether it is style-based or not, DW finds it out and sets it manually)
and there you have it. :-(

It's this last route (Edit > Paste Special) that most of
our users will probably use to get Word files into HTML via Dreamweaver.

And most users will use direct formatting in Word, too, right. :-(

I am thinking that Stefan is right in that this is probably something
that should be controlled from within Dreamweaver v. from within Word. I
only wanted to be sure that, in Word, there isn't some
obvious-to-everyone-except-me :) feature that allows users to turn off
default paragraph setting.

If you really care for the "quality" of your code, then I'd try
exporting to HTML in Word, maybe running the result through HTMLTidy,
and importing that afterwards. Or teach your users to use Word
consistenly through styles (you will then get the property, but at least
it's the desired one).

Greetings
Robert
 
S

Suzanne S. Barnhill

You can modify the paragraph alignment of the style as well as every other
aspect of it. In the Modify Style dialog, click Format and choose Paragraph.
 
B

Barbara White

Suzanne said:
You can modify the paragraph alignment of the style as well as every other
aspect of it. In the Modify Style dialog, click Format and choose Paragraph.

Right. I'm looking for a way to NOT specifiy alignment of a paragraph in
Word (using Styles). Right now, you have to choose Left, Right, Center,
or Justify. If you don't address that box in the Paragraph window, then
"Left" is chosen by default; there is no "off" position or "as-is"
setting--that is, there is no such setting that I know of. I was
investigating that...

Thanks.
Barbara
 
B

Barbara White

If you really care for the "quality" of your code, then I'd try
exporting to HTML in Word, maybe running the result through HTMLTidy,
and importing that afterwards. Or teach your users to use Word
consistenly through styles (you will then get the property, but at least
it's the desired one).

Word -> HTML is awful (hence your recommendation, I'm guessing, for
using HTMLTidy on the Word->HTML output). I've not used that tool; I've
just avoided saving Word files to HTML. I'll check it out, though. Thanks.

(I do remember trying to use one tool or a plug-in that was supposed to
clean up Word HTML but I had some problem with it. Can't remember what
that was offhand.)
 

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

Top