How can I test a Cascading Style Sheet offline?

Larrie July 9, 2011
Pinterest Stumbleupon Whatsapp

I would like to know how to test CSS offline in a working copy of a webpage.

  1. Mike
    July 10, 2011 at 12:13 am

    If it's a static homepage (html) you can open the site with the linked CSS right in your favorite browser. For pages with PHP you will have to run a local webserver with PHP enabled (same goes for other server sided scripts).

    There are several ways to setup a local server but for testing purposes I think the easiest will be to get an ready-to-use server package. You can get an entire list of the AMP stacks at Wiki
    http://en.wikipedia.org/wiki/AMP_(solution_stack)

    • Larrie
      July 10, 2011 at 9:07 am

      Mike
       
      i have done so and no changes to the css sheet work. if i comment out the link reference to the css sheet, then the formatting of the page changes. for example, if i specify a color with a selector, the requested color doesnt appear. i put the whole website online yesterday the color scheme didnt appear as anything but white even though i specified black for the background....
       
      thanks

      • Mike
        July 10, 2011 at 2:54 pm

        If commenting out the link reference removes the entire formatting then the CSS is applied to the page.

        You problem is within the coding then ~ most common mistakes are:
        - duplicated classes/id/elements/selector
        - inline styles overruling the CSS file
        - misused CSS selectors

      • James Bruce
        July 11, 2011 at 8:03 am

        CSSEdit for the mac allows you to edit CSS on live webpages and preview the differences, then save and replace the live CSS. 

        On windows, no ideas I'm afraid/