fredie10 Posted July 1, 2010 Share Posted July 1, 2010 Hi out there,Hope someone can help with the following problem.Does anyone know how to add an another css besides global.css. I want a seperate css to IE6.I think i need this code: <!--[if lte IE 6]> <link href="/themes/yourtheme/css/ie6_only.css" rel="stylesheet" type="text/css"> but where and how?Thanks Link to comment Share on other sites More sharing options...
rocky Posted July 2, 2010 Share Posted July 2, 2010 Just put that code in header.tpl in your theme's directory before the script calls, then add a ie6_only.css file in the css directory inside your theme's directory. Link to comment Share on other sites More sharing options...
fredie10 Posted July 3, 2010 Author Share Posted July 3, 2010 Thanks for your reply.It dosen't work. Have i placed it wrong? <html > <head> <title>{$meta_title|escape:'htmlall':'UTF-8'}</title> {if isset($meta_description) AND $meta_description} <meta name="description" content="{$meta_description|escape:htmlall:'UTF-8'}" /> {/if} {if isset($meta_keywords) AND $meta_keywords} <meta name="keywords" content="{$meta_keywords|escape:htmlall:'UTF-8'}" /> {/if} <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico" /> {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} <link href="/themes/New Valueshop/css/ie6_only.css" rel="stylesheet" type="text/css"><![endif]—> [removed][removed] Link to comment Share on other sites More sharing options...
Star Posted July 3, 2010 Share Posted July 3, 2010 Place it right below <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> After that, should looks like this: <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> <link href="/themes/New Valueshop/css/ie6_only.css" rel="stylesheet" type="text/css"><![endif]—> Link to comment Share on other sites More sharing options...
razaro Posted July 3, 2010 Share Posted July 3, 2010 Try to put this in href href="{$content_dir}themes/New Valueshop/css/ie6_only.css and not just /themes/New Valueshop/css/ie6_only.css Link to comment Share on other sites More sharing options...
fredie10 Posted July 3, 2010 Author Share Posted July 3, 2010 Still not working... I tried to paste the code inside the header.php in the root directory but with no luck. I think it's weird because it looks like it's the right code. Link to comment Share on other sites More sharing options...
eltitos Posted July 5, 2010 Share Posted July 5, 2010 try without lte <!--[if IE 6]> Link to comment Share on other sites More sharing options...
fredie10 Posted July 6, 2010 Author Share Posted July 6, 2010 Nice it's working now without the lte. I ended up with this code and it's working perfect {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> <link href="/themes/newvalueshop/css/ie6_global.css" rel="stylesheet" type="text/css"><![endif]—> {/foreach} {/if} Thanks for your time.RegardsMike Link to comment Share on other sites More sharing options...
eltitos Posted July 6, 2010 Share Posted July 6, 2010 for information the lte option it for internet explorer < Ie6 Link to comment Share on other sites More sharing options...
fredie10 Posted July 6, 2010 Author Share Posted July 6, 2010 It went a little to fast... Every other browser is also using the ie6_global.css now. It was so close Link to comment Share on other sites More sharing options...
eltitos Posted July 6, 2010 Share Posted July 6, 2010 try to put this tag for the normal css <!--[if !IE]><!--> <!-- Link to comment Share on other sites More sharing options...
fredie10 Posted July 6, 2010 Author Share Posted July 6, 2010 Have I placed the new code correct? {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <!--[if !IE]><!--><link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /><!--<link href="/themes/newvalueshop/css/ie6_tester.css" rel="stylesheet" type="text/css"><![endif]—> {/foreach} {/if} Unfortunately this it not working but the chances that i have placed it wrong is big. Link to comment Share on other sites More sharing options...
eltitos Posted July 6, 2010 Share Posted July 6, 2010 no it's at the good place... Link to comment Share on other sites More sharing options...
rocky Posted July 6, 2010 Share Posted July 6, 2010 That's the wrong place. You should put it after the {/if}, otherwise that code will display multiple times depending on how many items are in the $css_files array. Link to comment Share on other sites More sharing options...
fredie10 Posted July 6, 2010 Author Share Posted July 6, 2010 Hi Rocky,Will you try to give me an example? I'am confused and don't what to do. I have tried a lot things and i'am affraid that I mixing it all together. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico" /> {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} The code above is the deafult settings but how will you link it from here?Thank you in advance Link to comment Share on other sites More sharing options...
rocky Posted July 6, 2010 Share Posted July 6, 2010 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="generator" content="PrestaShop" /> <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> <link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico" /> {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} <link href="/themes/newvalueshop/css/ie6_tester.css" rel="stylesheet" type="text/css"><![endif]—> Link to comment Share on other sites More sharing options...
fredie10 Posted July 6, 2010 Author Share Posted July 6, 2010 Your right. Now it uses ie6_tester.css but unfortunately also in firefox, safari etc. It seems like ie6_tester.css is the main css now and global.css is not active anymore. Strange. Link to comment Share on other sites More sharing options...
doublesam27 Posted July 28, 2010 Share Posted July 28, 2010 Hello, If it can help, I think there was a letter missing in <!--[if IE 6]>, that's why it didn 't work. What works for me is: <!--[if IE 6]><link href="/themes/mytemplate/css/ie6_global.css" rel="stylesheet" type="text/css"><![endif]--> and you can use a different template for ie6 Link to comment Share on other sites More sharing options...
Stefand Posted January 15, 2011 Share Posted January 15, 2011 I have the same problem!Rocky, your code willn't work..HELP Link to comment Share on other sites More sharing options...
klavdijl Posted October 11, 2011 Share Posted October 11, 2011 a bit of revival but in case someone needs this: - top examples are mostly missing the conditional statement for ie only css - don't put the conditional css in the loop but under the if {if isset($css_files)}{foreach from=$css_files key=css_uri item=media}<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />{/foreach}{/if}--PLACE IT HERE-- - this works for default theme <!*--[if IE 6]> <link href="{$content_dir}themes/prestashop/css/ie6.css" rel="stylesheet" type="text/css"> <!*[endif]--> just remove the stars (*) in the comment signs also: don't forget you are editing template files, so clear smarty cache and compile folders to apply changes Link to comment Share on other sites More sharing options...
TWDesign Posted July 17, 2012 Share Posted July 17, 2012 a bit of revival but in case someone needs this: - top examples are mostly missing the conditional statement for ie only css - don't put the conditional css in the loop but under the if {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} <link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" /> {/foreach} {/if} --PLACE IT HERE-- - this works for default theme <!*--[if IE 6]> <link href="{$content_dir}themes/prestashop/css/ie6.css" rel="stylesheet" type="text/css"> <!*[endif]--> just remove the stars (*) in the comment signs also: don't forget you are editing template files, so clear smarty cache and compile folders to apply changes Thanks. This was useful to me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now