PD24
PD24

Reputation: 774

How do i load my ASHX CSS handler?

I want to parse my css code into this conditional css parse (i hope ive said that correctly) http://www.conditional-css.com/usage

The instructions say that i must paste the c-css.ashx file in the folder where the CSS resides.

Next i must add an @import line in my template master file???

below are the instructions, can you help me out?

ASHX handler

The C# ASHX version of Conditional-CSS is perfect if you wish to try out Conditional-CSS in a .Net environment, or only have a couple of CSS files on your site. To install:

  1. Place the downloaded file (c-css.ashx) on your server in the same location as your CSS files.

  2. Load the 'c-css.ashx' file you uploaded in your web-browser and admire the parsed CSS.

  3. Include the 'c-css.ashx' file as you would any CSS file on your web-pages using: @import "{path_to_}/c-css.ashx"; (or similar).

Upvotes: 1

Views: 2391

Answers (1)

Doozer Blake
Doozer Blake

Reputation: 7797

In your <head> section of an html page, an @import is done like so:

<style type="text/css" media="screen">
@import "/pathtocss/c-css.ashx";
</style>

There's no reason why you couldn't do it with a <link> either:

<link rel="stylesheet" type="text/css" href="/pathtocss/c-css.ashx">

Upvotes: 4

Related Questions