Guest kilbad Posted August 11, 2006 Share Posted August 11, 2006 Why do people use @import 'another_css_file.css' in their main css file? Why not just link to the other sheet in the page header? Is there a benefit to doing it this way?thanks! Brendan Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 11, 2006 Share Posted August 11, 2006 http://www.hwg.org/resources/faqs/cssFAQ.html#importAnd older version of Netscrap couldn't understand @import and thus ignored it, allowing what amounts to a Netscrap-compatible style sheet plus imported styles for other browsers. Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 12, 2006 Share Posted August 12, 2006 and using @ in most programming languages (PHP C#....)It stops errors being shown@require("file.php");If this fails, with the @, no error messages are shown to the browser Quote Link to comment Share on other sites More sharing options...
pixy Posted August 12, 2006 Share Posted August 12, 2006 I just do this:<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css" MEDIA="screen"> Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 12, 2006 Share Posted August 12, 2006 I normally have something like this (well this exact, its copied from one my websites)<link href="spaininland.css" rel="stylesheet" type="text/css" /><!--[if IE]><link href="spaininlandie.css" rel="stylesheet" type="text/css" /><![endif]-->This sorts out some crap just for IE Quote Link to comment Share on other sites More sharing options...
pixy Posted August 13, 2006 Share Posted August 13, 2006 Yeah, I have to change some stuff for IE. I hate Internet Explorer.I just do it in PHP:if (strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), 'MSIE') { // IE stuff}else { // FF stuff} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.