carplu Posted May 12, 2014 Share Posted May 12, 2014 Hi if i want to change css and for this create a custom.css file... is that possible? and do i put the custom.css file in the same folder as global.css? and i guess i would need to call it in header.tpl is this the correct code: <link href="{$css_dir}custom.css" rel="stylesheet" /> and where exactly would i need to insert it to make it work? I tried some options, but don't see results Thanks Link to comment Share on other sites More sharing options...
dioniz Posted May 12, 2014 Share Posted May 12, 2014 You can create new custom file. If you will put it in same folder as global.css use bottom code in header.tpl: <link rel="stylesheet" href="{$css_dir}custom.css" type="text/css" media="{$media}" /> Link to comment Share on other sites More sharing options...
carplu Posted May 12, 2014 Author Share Posted May 12, 2014 where would i put it? if i put it in here: {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link rel="stylesheet" href="{$css_uri}" type="text/css" media="{$media}" /> <link rel="stylesheet" href="{$css_dir}custom.css" type="text/css" media="{$media}" /> {/foreach} {/if} nothing happens Link to comment Share on other sites More sharing options...
dioniz Posted May 13, 2014 Share Posted May 13, 2014 I put it just after {if isset($css_files)} and it works Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 where would i put it? if i put it in here: {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link rel="stylesheet" href="{$css_uri}" type="text/css" media="{$media}" /> <link rel="stylesheet" href="{$css_dir}custom.css" type="text/css" media="{$media}" /> {/foreach} {/if} nothing happens if you don't see changes it's more than possible that it's related to cache. make sure that: - force compile is turned ON - cache is turned OFF (adv. parameters >performance) 1 Link to comment Share on other sites More sharing options...
carplu Posted May 13, 2014 Author Share Posted May 13, 2014 Vekia, I didn't ry that, but since that slows down the site, must i leave these settings like this or can i return to "force compile off" and "cache on" afterwards? (since i am in development i have cache turned off anyway at the moment but i want to use it when going live Link to comment Share on other sites More sharing options...
carplu Posted May 13, 2014 Author Share Posted May 13, 2014 Hi Vekia that worked :-) @ Dioniz , that might work but i would need to use !important everywhere... where it sits now, it is handled after the other css (i guess) so it takes effect without !important Correct me if i am wrong Cheers Carlo Link to comment Share on other sites More sharing options...
falkor Posted May 13, 2014 Share Posted May 13, 2014 You're right you need to use !important or simply set it just after foreach closing tag.Because when two selectors have same strength last one will be used. Link to comment Share on other sites More sharing options...
vekia Posted May 13, 2014 Share Posted May 13, 2014 Vekia, I didn't ry that, but since that slows down the site, must i leave these settings like this or can i return to "force compile off" and "cache on" afterwards? (since i am in development i have cache turned off anyway at the moment but i want to use it when going live when everything will be ready disable force compilation and enable cache, while you're working on your theme - work with force compile and without caching Link to comment Share on other sites More sharing options...
Recommended Posts