madsovenielsen Posted February 12, 2011 Share Posted February 12, 2011 HelloI am trying to import a stylesheet from another server <style type="text/css"> @import url("http://x.find.dk/default.css");</style> I have found some examples around the web, so this shouldt be possible.http://htmlhelp.com/reference/css/style-html.htmlhttp://www.howtocreate.co.uk/tutorials/css/externalfilesThe styles in default.css is not taking effect on the site i am trying to import it to.Whats wrong ?/mads Link to comment Share on other sites More sharing options...
jeffman Posted February 12, 2011 Share Posted February 12, 2011 Your exact code worked perfectly for me. Is your code box exactly what is in your document? If there is more CSS in the style sheet, make sure the @import rule is the first line, or it will not work.Have you tried loading the document into your browser from the address bar? If you cannot receive it that way, you cannot receive it at all. I don't know why this would happen, since it seems you are both in Denmark, not Egypt or somewhere with funny connections. Link to comment Share on other sites More sharing options...
madsovenielsen Posted February 12, 2011 Author Share Posted February 12, 2011 Your exact code worked perfectly for me. Is your code box exactly what is in your document? If there is more CSS in the style sheet, make sure the @import rule is the first line, or it will not work.Have you tried loading the document into your browser from the address bar? If you cannot receive it that way, you cannot receive it at all. I don't know why this would happen, since it seems you are both in Denmark, not Egypt or somewhere with funny connections.I deleted the whole <style> section and added it again. it works now.Thansk Link to comment Share on other sites More sharing options...
jeffman Posted February 12, 2011 Share Posted February 12, 2011 Did you copy/paste the original? Sometimes funny linebreak sequences can mess things up. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.