Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

is it possible to force a font down through all styles?

 

im having a problem where font declerations from word are being passed into a schools website. and i know that if i spend my afternoon fishing out all the style declerations from the page sources it will be fine untill they copy another word doc in and i have this problem all over again. so is it possible to force a style to go down all the levels and over ride any stlyes declared on the fly?

Posted
nope, its the way css ordering works, for example spans and such will over ride whatever is applied before. unless you possibly try the add the css link/import at the end of the document.... (i haven't tried that so it might not work)
Posted
The real mistake is copying directly from Word. Copy to Notepad first to remove all formatting, then copy to the web as normal.

 

yep, it would work even better if instead of typing it in word they typed it into the lovely WYSIWYG editor on the site.

 

nope, its the way css ordering works, for example spans and such will over ride whatever is applied before. unless you possibly try the add the css link/import at the end of the document.... (i haven't tried that so it might not work)

 

i was afraid of that.

 

time for some lovely REGEX in php to remove the styles

Posted

Thanks, been looking into it, word seems to use every method of deinining styles known to man, and the source is a nasty thing. I can strip out the word c**p but then alignment etc... bear no ressemblent to what it looks like in the editor (cause that still has word formatting).

 

im just gonna have to go through all the pages one at a time and fix the formatting :mad: and then put a big thing above the editor about pasting from word

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...