it is possible to import the css file from another server? let's say i have my html on www.mysite.com can i import my css like this?
<link href="www.anothersite.com/style.css" rel="stylesheet" type="text/css" />
it is possible to import the css file from another server? let's say i have my html on www.mysite.com can i import my css like this?
<link href="www.anothersite.com/style.css" rel="stylesheet" type="text/css" />
Yes, any full url is valid for css. You'll want to include http:// though.
<link href="http://www.anothersite.com/style.css" rel="stylesheet" type="text/css" />
You'll probably want to start the url with http://
, otherwise some browsers will interpret that as http://your.currenturl.com/www.anothersite.com/style.css
.
Just to extend the other guys comments, and particularly for those using SSL certificates, you might want to write the href as "//www.anothersite.com/style.css" to avoid issues with an SSL site requesting content from a non SSL site.
Note that you exclude the "http:" or "https:" bit from the URL.
The browser will automatically add either "http:" or "https:".