Use CSS via <LINK>

G

Guest

I found that I can use <LINK REL = "stylesheet" TYPE = "mime/type" HREF = "styles.css"> to use the CSS file of my project. But it seems it's not working. Is HREF = "styles.css" not sufficient or where is my mistake?

Thanks Sonija
 
R

Rob Meade

...
I found that I can use <LINK REL = "stylesheet" TYPE = "mime/type" HREF =
"styles.css"> to use the CSS file of my project. But it seems it's not
working. Is HREF = "styles.css" not sufficient or where is my mistake?

Hi Sonija,

I use the same and it seems to work for me.

One thing I did find is that some of the controls - the server controls
mainly I think need cssClass="<your_class>" instead of just
class="<your_class>" etc...but other than that it seems to work...

I assume you have the TYPE= set to text/css in the actually page?

Regards

Rob
 
P

Peter Rilling

Is that the exact syntax you are using? Rather then "mime/type", try
"text/css".

Sonija said:
I found that I can use <LINK REL = "stylesheet" TYPE = "mime/type" HREF =
"styles.css"> to use the CSS file of my project. But it seems it's not
working. Is HREF = "styles.css" not sufficient or where is my mistake?
 
M

Michael Earls

Where is the file stored?

href="~/css/styles.css"

~ = application path (assuming usage on a control)

Sonija said:
I found that I can use <LINK REL = "stylesheet" TYPE = "mime/type" HREF =
"styles.css"> to use the CSS file of my project. But it seems it's not
working. Is HREF = "styles.css" not sufficient or where is my mistake?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top