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 Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/ 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. Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/#findComment-73379 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 Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/#findComment-73684 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"> Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/#findComment-73685 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 Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/#findComment-73696 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} Link to comment https://forums.phpfreaks.com/topic/17291-why-do-people-use-import-another_css_filecss-pros-and-cons/#findComment-73903 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.