Search code examples
csscodeignitergoogle-chromegoogle-chrome-devtoolshost

codeigniter website on a host- CSS changes does not change front end elements


  • My site is in a Host. (Not localhost)
  • Framework: CodeIgniter.
  • Changes made using CSS: Flot chart's legend

I did changes to front end using Chrome tools/developer tools. I can see all the changes I made instantly.

I FTP to the site, downloaded the CSS file, did necessary changes (same as chrome developer changers) and uploaded the CCS file.

I access the site, but I cannot see the changes I made using CSS file.


Solution

    1. Check if your hosted CSS contains the latest changes
    2. If CSS is ok try to open chrome dev tools and inspect the element that you are trying to modify. Scroll through the CSS applied to that element and check if your styles are there.
    3. If you didn't find any of the styles that you are tring to apply to the element probably you misspelled the selector name. Remember to check .class #id

    also, in order to ensure that your CSS files are not cached suffix your php files like this

    <link href="/stylesheet.css?<?php echo time(); ?>" rel="stylesheet" type="text/css" /&glt;
    

    EDIT tip above also works for any resource! (css, javascript files, images ...)