View Single Post
  #4  
Old 07-07-2011, 05:39 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: HELP me before I kill myself/hate conditional comments

It is not entirely clear from your description how you are using conditionals for css. It looks like you have different kinds of conditions - the css that you want to run for various IE browser versions and the css you want to run when the site is in your second language.

For the IE version differences - you should be able to use the main.IE6.css and main.IE7.css and the built in IF conditions in X-Cart 4.2.2. On IE7, you can use the IE Developer toolbar to help you debug the css, so you can see exactly what is getting set.

For the css based on the language - it seems that you would need to use smarty if statements, and then add either inline css or css to your header after all the other css is loaded. Something like:

<style type="text/css">
{if $whatever_your_language_variable_is eq "language2"}
<!--
{literal}
#page-container2 { .. your css }
{/literal}
-->
{/if}
</style>

or:
{if $whatever_your_language_variable_is eq "language2"}
<link rel="stylesheet" type="text/css" href="/skin1/my-second-langauge.css" />
{/if}

You should be able to use combination of the smarty If statements and the IE7/IE6 if statements to css to support your browser/language combinations.

---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote