Using Style sheets in CakePHP

Recently I’m start working with CakePHP for one of my official project ‘The Bangabhaban website’. This is my second local project. First one was ‘’ developed with CodeIgniter. I’m very happy to being developer of such a project. Lets happy starting.
I had to develop a template for demo purpose. here I discussed some CSS related problem solving tricks:
1. External Style Sheets: For access all images and style sheets you have to add following codes into .htaccess file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ – [L]

2. AssetHelper: is a great  helper for
CSS and JS compression. You can find it in .

3. CSS Tidy: is an opensource CSS parser and optimiser. CSSTidy has full CSS2 support and a higher reliability. Any way to configure the helper and/or CSS Tidy to just combine all of
my CSS files into one:

$this->settings[‘remove_bslash’] = false;
$this->settings[‘compress_colors’] = false;
$this->settings[‘compress_font-weight’] = false;
$this->settings[‘lowercase_s’] = false;
$this->settings[‘optimise_shorthands’] = 0;
$this->settings[‘remove_last_;’] = false;
$this->settings[‘case_properties’] = 0;
$this->settings[‘sort_properties’] = false;
$this->settings[‘sort_selectors’] = false;
$this->settings[‘merge_selectors’] = 0;
$this->settings[‘discard_invalid_properties’] = false;
$this->settings[‘css_level’] = ‘CSS2.1’;
$this->settings[‘preserve_css’] = true;
$this->settings[‘timestamp’] = false;


5 Responses

  1. i am having problem loading CSS. I have tried several ways but i dont hw i ll fixed this problem. I need some help or need some reference 4m where i can get some instruction to solve that.

  2. dew, just load html helper and put echo $html->css(“file-name.css”);

  3. Hello, If you looking for freelancer/hire a Cakephp developer then i can work for you, i have more then 5years of experience in Cakephp and i can do your work at cheapest rate which you never listen please request for quote or reference work .

    Expertise in Cakphp Application , Modification and Solve the Bug
    Last Project was Swoopo Modication !

    i can do it easily


  4. Blueair 402 Filter…

    Blueair 402 Replacement filter…

  5. Perhaps you have considered including some video lessons in your report.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: