I have just started working on fixing up a blog for a client of mine as her posts and sidebars were all showing different fonts. I got the CSS cleaned up but now I am seeing something really odd.
I have noticed that throughout all her posts, there are the odd ones that are still showing the wrong font. While using Firebug I have found that all these “odd” posts have an element.style but I can not for the life of me find where these elements are. I have searched the CSS a number of times and nothing there.
It appears as though this element.style is overriding the fonts set up in the CSS. Does anyone know what these are, how they got there or how I can get rid of them?
element.style means the styles are applied inline in the html - look for a style=" " attribute in the html. These will always override the styles set in a stylesheet.
It won’t appear in the HTML because it won’t show any HTML modified by JavaScript. However, if you do “Select All” (ctrl+A) and then right click somewhere and choose “View selection source”, then you should see all the HTML, included what was done by JavaScript. Look for style=" in there.
This is dynamically updated via Javascript. I suggest looking for “.style” in the JS being used, or link us to it if you’re not comfortable looking at JS.
This means that wherever the posts are stored, there are inline styles. I think MsoNormal is generated by MS Word, so you’d have to go through and get rid of these manually unless you know regex which you may use on the database content files.