View Single Post
Old 03-20-2009, 12:43 AM   #32 (permalink)
Krik
The Contributor
 
Join Date: Feb 2009
Posts: 65
Thanks: 0
Krik is on a distinguished road
Default

Quote:
Does the STYLE attribute in the DIV tags override anything that's set in the CSS styles?
Yes inline will override the styles set in the style tags or a CSS file.

I should note that placing inline style ahead of the id or class tag causes the styles set to the id or class tag to override the inline styles. So always place inline styles after the id and class tags.

As well style set to an id tag can be overridden by style set to a class tag if the class tag follows the id tag.

And style set in a file that is called before style set in <style> tag can be overridden by the style in the <style> tag.

EDIT: if your confused sorry but one more here. You can get javascript to override all the above overrides by having a function called with the onload event that set an elements style.

Best I can count you could override your styles 6+ times in the same page. Of course that is just poor coding but I can be done.
Krik is offline  
Reply With Quote
The Following User Says Thank You to Krik For This Useful Post:
allworknoplay (03-20-2009)