3

Is there a way I can load a CSS stylesheet to a site I'm viewing in a browser?

I'm working on my company website. For obvious reasons I don't want to make changes to the live version of the site while I develop. Normally there is a development version I can work on, but this is currently down. All I need to do is add CSS and see these changes as I go along.

Firefox's web developer can add a local stylesheet, but as soon as you refresh the page or navigate away it stops being added and you have to manually add it again (even with persist features turned on). With all the incremental changes I need to make this isn't really a solution for me.

2 Answers 2

4

The Stylish Firefox add-on lets you manage a collection of local stylesheets that can be specified to work only for specific domains. Have a look at userstyles.org for what people have done with it.
There's also a version for Chrome, if needed.

2

You can put an alternate stylesheet into the header:

<LINK href="mystyle.css" title="Medium" rel="alternate stylesheet" type="text/css">

You can then select it from Firefox with View->Page Style->your stylesheet.

Anyone else viewing the page could do that, but I doubt they will think to do it. Presumably it's not a big problem if they do though.

This addon amongst other things lets you specify a local stylesheet if you can't change the live site. (I've not used it myself.)

4
  • Thanks for your solution. Ill bear it in mind for the future, but sadly it wont work for me. I cant get access to the web root of the live site at all, so I cant modify the live site in any way.
    – Evanss
    Sep 22, 2011 at 14:58
  • That's an interesting idea! Since Firefox 6, the option to change the page style is hidden, you have to press the <alt> key to temporary get the menu back. Sep 22, 2011 at 14:58
  • @user793011 I've updated my answer in the light of that comment. Sep 22, 2011 at 15:16
  • Thanks again but sadly it has the same problem as the web developer add on, when you refresh or go to a new page the style sheet isn't loaded.
    – Evanss
    Sep 22, 2011 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.