Jump to content

custom.css


Recommended Posts

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

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

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

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)

  • Like 1
Link to comment
Share on other sites

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

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

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

×
×
  • Create New...