November 30, 200817 yr Hi all, My CSS works fine with Windows Internet Explorer, and passes w3c validation, but Firefox simply does not register the .css file and loads my page as if the CSS does not exist. Incidentally, when the code is imbedded in the xhtml through <style> tags in the header, it works fine - and I have triple checked that the <link> tags link to the correct CSS file. So I've saved the following in the .css file: body{font: 70% sans-serif} div#image{float:right} div#introduction{margin-top:28px} div#maininformation{clear:both;margin-left:150px;margin-right:150px} Anybody have any idea? I've been wrestling with this for some time. Thanks, delmonte
December 1, 200817 yr can you show us the link you are trying to use please.. sounds like a simple root problem, first try ../mystyle.css
December 1, 200817 yr <link href="style.css" type="css/text" rel="stylesheet" /> As long as the stylesheet is in the same directory as the page it should work.
December 1, 200817 yr If you're using includes, or just for the sake of consistency, always link to your CSS with an absolute URL or one with a prefixed slash. For example; <link rel="stylesheet" type="text/css" src="/path/from/root/to/style.css" />
Create an account or sign in to comment