Before you vote or answer, I know that you should use the attributes for XHTML, (actually this should be placed in its own .css) I am simply trying to understand how it is handled because of the unique results I was getting.
I found issues with a few sites I ended up taking on, that ran the CSS with what looked to be no issues at least with the CSS. It was after having a few jquery issues and slow processing that I looked to optimize. I ended up finding a common issue. It was a module holding inline CSS <style> tags without the type attributes. Btw, these are XHTML and not HTML5 sites. Changing the tags by adding attributes or removing the inline CSS looks to correct each site with the problems.
My question is, what is actually happening that would cause an issue to corrupt the process and still allow the CSS to function properly. This is out of pure curiosity and all style has been placed in it’s own file. These are in a Joomla 1.5 module.
To really detail out one issue that happened more than once was a mask failed to complete it’s process and happened to be code that followed the inline CSS. So far, this has yet to happen on 80 or so other sites with the same exact code, minus the style error.
by default xhtml should be validated…any deviations away from validation will inevitably lead you to a rendering engine (or 3)’s choking death.
in most (x)html versions < html5, using the type attribute and text/css value is required for validation. it is redundant, but that’s certainly no reason to not use it.
offhand vague hints at what you are viewing:
sounds like the inline css is conflicting with your js, most likely you’ve got some scripts firing pre onload; u can wait for page load to fire them off. as long as your styles are loading properly, users will not know the difference. page loads pretty preload. page operates properly onload.
another reason for proper css rendering is the forgiving nature of most css engines; they’re built with the understanding that authors can and will churn out enterprise, spaghetti front-end code. kind of like how a tank is made to roll through any and every terrain. xhtml is one of the few (that i’m aware of) instances were validation was required…if you’ve noticed html5’s rise to power, it is clearly replacing xhtml and its strict ways. or rather, xhtml wasn’t exactly a success. in some ways, forgiveness has actually made the web suck more, because author’s weren’t forced to operate with valid techniques. forgiveness is awesome though, it allows (some) access to old documents/horrible constructed documents
imo you should just keep on playing with the validator. remember not to focus on the validation aspect, it’s a tool, just knock out errors as they come. trust me, they repeat themselves so often, if you do it enough, you won’t even have to rely on it. and knowing how the user agents react within/without the scope of validation is supreme knowledge.