newest version removing div alignment every time i save

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
dpakman91
Forum Members
Forum Members
Posts: 68
Joined: Tue May 13, 2008 4:19 pm

newest version removing div alignment every time i save

Post by dpakman91 »

this is only happening on my cmsms installations of the "cuba" version.

when i put some content on a page in a div with align="center" and save it, and then go right back into it, the "center" tag is gone. then when i edit it and apply again, it will stick.

however, if i go back into that page and change anything, then it will go back to removing the center tag. again, i have to go back in, add it, and save. what might be going on? is this a version glitch?
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: newest version removing div alignment every time i save

Post by Russ »

Some example of the code you are setting? Which editor are you using? It may well be that what you are trying to set is not 'web standard' code and that the editor is set to save only 'web standard' code? You really need to provide some more information if you expect to get any useful help ;-)

Russ
dpakman91
Forum Members
Forum Members
Posts: 68
Joined: Tue May 13, 2008 4:19 pm

Re: newest version removing div alignment every time i save

Post by dpakman91 »

Russ wrote: Some example of the code you are setting? Which editor are you using? It may well be that what you are trying to set is not 'web standard' code and that the editor is set to save only 'web standard' code? You really need to provide some more information if you expect to get any useful help ;-)

Russ
basically anything i want to put in the following tag:

code here

once i save it the first time, it wasn't showing up center aligned, so i'd go back in right away, and the align="center" part was gone. I added it back in AGAIN, and it stuck.

however, if i then go back INTO that page, and change ANYTHING on it in either the WYSIWYG editor, or in the code editor, and save again, it will again remove the align="center" tag. Very weird.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: newest version removing div alignment every time i save

Post by Russ »

Not sure if '' is web standard enough .... and is being removed by the editor?

Try
code here

And then add some CSS to centre it, will this work?

.centerdiv {
text-align: center;
}

Russ
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: newest version removing div alignment every time i save

Post by Dr.CSS »

That is not standards compliant, you shouldn't even be putting <div in the editor it, centering, should be handled with CSS...

You may want to check all the tabs in the tiny interface there may be a setting that is stripping the noncompliant tags out...
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

Re: newest version removing div alignment every time i save

Post by Wiedmann »

That is not standards compliant,
Sure. "align" is a valid attribute for all Transitional- and Frameset- (X)HTML  DTD's.

Of course it's deprecated, not valid in Strict and completely removed in XHTML1.1
dpakman91
Forum Members
Forum Members
Posts: 68
Joined: Tue May 13, 2008 4:19 pm

Re: newest version removing div alignment every time i save

Post by dpakman91 »

well certainly that's no surprise to me, hahah, as i'm an almost incompetent coder!

is the concensus that i should be using the CSS technique mentioned above for centering?
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

Re: newest version removing div alignment every time i save

Post by Wiedmann »

is the concensus that i should be using the CSS technique mentioned above for centering?
That's the best way.

BTW:
This behaviour is because of TinyMCE's default ruleset for html cleanup. With a full XHTML ruleset you can use align in div.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: newest version removing div alignment every time i save

Post by Russ »

dpakman91 if you are happy with the explanation/solutions could you make this thread as solved

Russ
dpakman91
Forum Members
Forum Members
Posts: 68
Joined: Tue May 13, 2008 4:19 pm

Re: newest version removing div alignment every time i save

Post by dpakman91 »

Russ wrote: Not sure if '' is web standard enough .... and is being removed by the editor?

Try
code here

And then add some CSS to centre it, will this work?

.centerdiv {
text-align: center;
}

Russ
Russ,

Which stylesheet should I add the .center code to?
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: newest version removing div alignment every time i save

Post by Russ »

Hi dpakman91, I'm not sure what you are doing for style sheets, but in your main one would be fine, as long as it is one that is used in the page where you have the code. Any one destined for screen that is ;-)
Locked

Return to “[locked] Installation, Setup and Upgrade”