Does anyone know how to set the load order of css in miva 9?
Announcement
Collapse
No announcement yet.
CSS loading order
Collapse
X
-
Just for my own curiosity, why is the load order important? Is there some kind of conflict or side effect that can occur?
Thanks --Kent Multer
Magic Metal Productions
http://TheMagicM.com
* Web developer/designer
* E-commerce and Miva
* Author, The Official Miva Web Scripting Book -- available on-line:
http://www.amazon.com/exec/obidos/IS...icmetalproducA
Comment
-
The last CSS rule will override any previous rule.
Code:.someclass {color:black;} .someclass {color: red;} <p class="someclass"> text </p>
Any inline stlye will override an imported style sheet.
Code:<p class="someclass" style="color:blue;"> text </p>
Any !important will override all.
Code:<p class="someclass" style="color:purple !important" style="color:blue"> text </p>
Comment
-
And just to be clear:
IF YOU HAVE
.colorMe { color:red }
in myStyle.css
and
.colorMe { color:blue }
in otherStyles.css
and you call them in this order:
myStyle.css
otherStyles.css
then
<p class="colorMe">Hi!</p>
is blue
while,
otherStyles.css
myStyle.css
is red.
This is why the best way to managed style changes is to load your OWN stylesheet last, and copy any styles you need to modify in the built in styles sheets into your own stylesheet and make the changes there. So, when built in styles are changed, you just copy over the updated styles sheets. And unless you are doing something really different like change the structure of those styles (which you actually shouldn't), then you are done updating.
Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
Comment