Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

HELP me before I kill myself/hate conditional comments

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-06-2011, 02:23 PM
 
sadra.ho sadra.ho is offline
 

Member
  
Join Date: Jul 2009
Posts: 12
 

Default HELP me before I kill myself/hate conditional comments

First time post!

Basically my website has two languages and the second is right to left which messes up the ie 7 and below so i found the problems to be #page-container2 and #centre in the css due to their floats and positioning. I fixed these but when the fixes are applied they dont work in new browsers.

After doing my research it became clear that i need to use conditional comments but for the life of me I cant get em working. Ive tried every hack and everything but main.css seems to have the last word when I put in the new css (I used main.IE6.css).

Cheers in advance for the help guys!
__________________
4.4.2
Reply With Quote
  #2  
Old 07-07-2011, 02:22 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

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

Try putting the conditional css links after the main.css link?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #3  
Old 07-07-2011, 03:27 PM
 
sadra.ho sadra.ho is offline
 

Member
  
Join Date: Jul 2009
Posts: 12
 

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

Ive already done that but its a no go!
__________________
4.4.2
Reply With Quote
  #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
  #5  
Old 07-10-2011, 12:23 PM
 
sadra.ho sadra.ho is offline
 

Member
  
Join Date: Jul 2009
Posts: 12
 

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

Guys thanks a lot for your replies.

As it turns out the problem wasnt with the ie conditional comments but with bad design. To debug this I put a border round everything and worked out what the problem was. I found a way to remove content-container2 and moved the left and right bar into the #center to make it easier to manage. Somehow the redundant container was overridding the statements and only obeying main.css so doing this fixed the issue.

Very weird bug but after spending a hellish week with it im glad its fixed !
__________________
4.4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:04 PM.

   

 
X-Cart forums © 2001-2020