Developer forum

Forum » Templates » Removing CSS classes from headings

Removing CSS classes from headings


Reply

I'd like to remove the class="hX" definitions on my headings. Is there any way to avoid this case of classitis?


 


Frank


 


Replies

 
Nicolai Høeg Pedersen
Reply
frank@globereklame.dk wrote:


I'd like to remove the class="hX" definitions on my headings. Is there any way to avoid this case of classitis?




 




Frank




 



Only by custom coding...


 


Or maybe a nifty JS that loops through all document and removes the class...

 
Reply

Hi Frank




 




In one case I removed the tags <!--@Stylesheets--> and <!--@InlineStylesheet--> from the master template file. And defined all styles in my own hardcoded css-files.

 
Reply
hf@oerskov.dk wrote:


Hi Frank








 








In one case I removed the tags <!--@Stylesheets--> and <!--@InlineStylesheet--> from the master template file. And defined all styles in my own hardcoded css-files.





Hi Henrik


 


Thanks for your comment. I actually used the technique you are describing. But in an effort to keep my XHTML as clean as possible, I am looking for a way to avoid all the superfluous class definitions generated by the Dynamicweb text editor.


 


The option to turn off class definitions in the editor might be a good feature request for an upcoming service release ...


 


Frank


 

 
Reply

Dynamicweb != XHTML compliant code


:-)


If you like XHTML, try another CMS

 
Nicolai Høeg Pedersen
Reply
hf@oerskov.dk wrote:


Dynamicweb != XHTML compliant code




:-)




If you like XHTML, try another CMS





Dont mess up your definitions. XHTML 1.0 Transitional is VERY different from XHTML 1.1 strict.


 


Classes are totally "allowed" in both versions (like

) - attributes are not in XHTML 1.1 strict. Big difference - take a look at this good article: http://www.hintzmann.dk/articles/doctype/


 


So its more Dynamicweb != XHTML 1.1 Strict compliant code - that is true though.

 
Reply
np wrote:



hf@oerskov.dk wrote:











Dynamicweb != XHTML compliant code
















:-)
















If you like XHTML, try another CMS




















Dont mess up your definitions. XHTML 1.0 Transitional is VERY different from XHTML 1.1 strict.








 








Classes are totally "allowed" in both versions (like




) - attributes are not in XHTML 1.1 strict. Big difference - take a look at this good article: http://www.hintzmann.dk/articles/doctype/

 








 








So its more Dynamicweb != XHTML 1.1 Strict compliant code - that is true though.







 









Sorry about the messing-up.


My point is: Dynamicweb is in many cases not a great tool for producing clean code (HTML/XHTML og whatever)

 
Nicolai Høeg Pedersen
Reply

Thats true...

 
Reply

It is possible to make clean & valid xHTML 1.0 Strict in Dynamicweb.


 


 


p.s. 



I wouldent use javascript to correct html error's as the page should be valid without javascript!


 


what you can do is hook up at pageview and make a function that will correct the different error's you might experience with the editor etc. (hint use a xml doc in your function with X and Y) so X is what it finds and Y is what it will be replaced with. That will make it easy to use in all your solutions that require strict coding.


 




Best Regards


Jais


jed@dkis.dk

 
Reply
jed@dkis.dk wrote:


It is possible to make clean & valid xHTML 1.0 Strict in Dynamicweb.




 




 




p.s. 







I wouldent use javascript to correct html error's as the page should be valid without javascript!




 




what you can do is hook up at pageview and make a function that will correct the different error's you might experience with the editor etc. (hint use a xml doc in your function with X and Y) so X is what it finds and Y is what it will be replaced with. That will make it easy to use in all your solutions that require strict coding.




 








Best Regards




Jais




jed@dkis.dk




I agree, but please note that it can't be done with standard DW software.

 

You must be logged in to post in the forum