Forum Discussion

peterlu's avatar
peterlu
Champion
11 years ago

how to put external css before the Lithium skin css

Hi All,

 

For eg. I have a <link rel="stylesheet" href="//example.com/to/some/style.css" /> , and I want it to be put before the Lithium generated skin css  eg. <link href="/skins/111115751/blablabla/some.css" rel="stylesheet" type="text/css"/>

 

 

How can I do it?

5 Replies

  • peterlu  - You can do following:

     

    Use the skin css from assets rather than from css tab in skin, and then refer your other css file before the one you just uploaded in the assets in the head section inside the wrapper tab.

     

    Copy your css, upload it in assets, lets say you named it custom_skin.css, refer it in skin > desktop > Wrapper > head 

  • peterlu's avatar
    peterlu
    Champion
    11 years ago

    Thanks Grazitti. The only problem of your method is that you are not able to use ${asset.get("")} for CDN in your css.

  • I didn't get you, do you mean that you can't include the CSS you uploaded in the assets using ${asset.get("")} or the one you are calling from external CDN?
  • peterlu's avatar
    peterlu
    Champion
    11 years ago

    Nono, I mean if you put you css in /html/assets instead of putting your css inside the css editor, then inside your css file, you will not be able to use ${asset.get("")}. eg. set background images etc by CDN.