Does anyone know how to set the load order of css in miva 9?
CSS loading order
Collapse
X
-
The order is determined by the order your CSS is called in via your global head tag. If you are using a ReadyTheme this order can be changed in the /themes/levels/css/all.php file (or css.php)
-
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.
someclass will display as color red.Code:.someclass {color:black;} .someclass {color: red;} <p class="someclass"> text </p>
Any inline stlye will override an imported style sheet.
will display as blueCode:<p class="someclass" style="color:blue;"> text </p>
Any !important will override all.
will display as purpleCode:<p class="someclass" style="color:purple !important" style="color:blue"> text </p>
Comment
-
Alphabet, if you use the Style Resources tab under User Interface there is no way I have found to order that list of CSS files.
The best way to add styles to your head tag is to hard code them in the HEAD Tag Content box.Calvin Nelson
Director of Web Development
2C Development Group
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