Software Programming

Kunuk Nykjaer

Attach a css file to any webpage dynamically

leave a comment »

Here’s a trick for applying a custom css file to any webpage.
Have a css file available (here i use Github to host my css file).

In the browser console run the following code.
The result should be white text on black background

Try go to and run the snippet code.
You should see white text on black background.


Written by kunuk Nykjaer

December 16, 2014 at 1:34 pm

Posted in Css, Javascript

Tagged with

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: