[SOLVED] Change background on frontpage

Joomla template which allow you to present sport news in amazing and professional way.
GK User
Sun Nov 20, 2011 3:02 pm
hello,

I'am using the ICKI Sports template. I want to change the background color of the div#component to black, but only on the frontpage! Does anyone know how to do this??

Thanks in advance!

Gerry Procee
User avatar
Fresh Boarder

GK User
Mon Nov 21, 2011 4:31 am
Try below, I havent tested this yet. So please backup your file before changing.

Find File: templatesgk_icki_sportsindex.php
Find Line: 25 to 28 which is below
Code: Select all
   <?php
      // including template header files
      include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/php/gk_head.php');   
   ?>

Add after below content.
Code: Select all
   <?php $css_code = " div#component { background: none repeat scroll 0 0 #000000; } "; ?>
   <?php $menu = & JSite::getMenu(); if ($menu->getActive() == $menu->getDefault()) { $document->addStyleDeclaration($css_code); } ?>

So all together head code looks like below.
Code: Select all
<head>
   <jdoc:include type="head" />

   <?php
      // including template header files
      include_once(JPATH_ROOT . "/templates/" . $this->template . '/lib/php/gk_head.php');   
   ?>
   <?php $css_code = " div#component { background: none repeat scroll 0 0 #000000; } "; ?>
   <?php $menu = & JSite::getMenu(); if ($menu->getActive() == $menu->getDefault()) { $document->addStyleDeclaration($css_code); } ?>
</head>


"#000000;" is the black background color.
See you around.
User avatar
Platinum Boarder

GK User
Mon Nov 21, 2011 9:47 pm
hi Norman, thanks for your reply. It didn't seem to work but then I added the !important statement to the $css_code and now it works fine!! Thank you very much for your help!!!

Best regards,
Gerry
User avatar
Fresh Boarder

GK User
Tue Nov 22, 2011 8:45 am
No problem at all.

See you around...
User avatar
Platinum Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.