So I reinstalled my Adobe CS5 Suite on a new machine. Just finished importing my sites and started to make a new page only to descover that instead of inserting the <center> tags, <div align="CENTER"> is added instead!
Don't give me any arguments that "Div tags are better than HTML" nonsense. I LOVE not having excess coding or visual obstructions when making a page. If, for some reason, I wanted to add a Div tag that was centered I'd manually create it. The pages I make do not need Div tags for the main body. Why should it require it?
Anyway, my issue is that there isn't a centering option anywhere in the preferences menu (like this page says there is http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822 510a94ae8d65-7f82a.html ) but I had been able to somehow disable it on the old machine running the same version. I recall having a similar issue, but I think I either found the option or called up support.
If this is a permanent issue, then Adobe needs to remove that centering entry from the webpage listed above and stop giving false hope like that. It's rude.
Otherwise, fix the bug.
In the meantime, I'll try experimenting with Templates.
It's probably in your settings. Go to Edit > Preferences > Code formatting...
Just so you know, the <center> tag and align attribute have been deprecated since HTML4. Eventually, newer browsers & web devices will simply ignore these tags. That's why it's important to keep up with modern web standards.
A CSS style is the preferred way to do this. Divs are not required to center text.
<p style="text-align:center">This paragraph is centered</p>
<p> this paragraph is not centered</p>
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
Have a screen shot - http://www.ospreygraphix.com/dreamweaver-bug.jpg
As you can see, the option doesn't exist. So when I press the shortcut to center or even the button in the CSS properties tab, it adds a Div Tag with an align=center attribute irreguardless of there being text selected or even present.
And I find if more efficient to have one instance of a command in a nesting format for two reasons. One: I can find where it starts and stops quickly. Two: the entire page is designed to be centered. It's a couple lines of text and a slew of thumbnails. Adding styles to paragraphs adds bytes to files (I know it sounds pointless, but I like efficiency whenever I can get it) which can add up towards upload/download and server/computer space limits a lot sooner than one might think. Like having 10 cents taken out of your paycheck for 3 years. It adds up in the long run.
If and when computers cease acknowledging that "deprecated" command, I'll switch to assigning "align=center" to the <p> attribute in a CSS file. It seems like such an inefficient way to get something simple done.
That option was available in older versions of DW. In CS6, deprecated tags have been removed.
If you want efficiency, use CSS properties to center your page. No special html code required. The whole point of CSS is to keep presentation styles separate from content making your HTML code leaner.
CSS:
body {
width: 980px; /**adjust width as needed**/
margin: 0 auto; /**with width, this is centered on screen**/
}
/**re-usable classes**/
.center {text-align:center}
.right {text-align:right}
.justify {text-align:justify}
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
North America
Europe, Middle East and Africa
Asia Pacific