Use CSS via <LINK>

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
...
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
 
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?
 
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?
 
Back
Top