Page 1 of 1
newest version removing div alignment every time i save
Posted: Mon Jun 16, 2008 8:49 pm
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?
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 7:12 am
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
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 2:17 pm
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.
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 3:49 pm
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
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 6:54 pm
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...
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 7:15 pm
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
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 7:52 pm
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?
Re: newest version removing div alignment every time i save
Posted: Tue Jun 17, 2008 8:34 pm
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.
Re: newest version removing div alignment every time i save
Posted: Thu Jun 19, 2008 1:17 pm
by Russ
dpakman91 if you are happy with the explanation/solutions could you make this thread as solved
Russ
Re: newest version removing div alignment every time i save
Posted: Thu Jun 19, 2008 2:12 pm
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?
Re: newest version removing div alignment every time i save
Posted: Thu Jun 19, 2008 3:00 pm
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
