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

CSS Hacks & Work-arounds

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-11-2006, 10:49 AM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default CSS Hacks & Work-arounds

the site i am working is displaying correctly in half the browsers I tested it on and incorrectly in the other half. generally when I run into a problem like this i use a css hack to resolve the issue for example:

#holder {
width: 150px;
height: 50px;
margin-top: 5px;
}

body > #holder {
margin-top: 2px;
}

This workaround hides the different margin from older versions of IE, and because of the different 'interpretations' of the box model, this and other hacks like it are easy fixes for cross browser compatitbility.

However in X-Cart they are not being read the same as they normally would. I just have to give one of my css boxes a different margin for firefox, and other browsers similar to it, without effecting older versions of IE, does anyone know a CSS based hack that would work in X-Cart? Thanks.
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote
  #2  
Old 12-11-2006, 05:57 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: CSS Hacks & Work-arounds

may not be the best way, but i know it works since i use it at the moment (too busy trying to get other things corrected)...

in the customer/home.tpl file i have:
Code:
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> <!--[if lt IE 7]> <link rel="stylesheet" href="{$SkinDir}/style_ie.css"> <![endif]-->

i use 2 style sheets, one for the old IE browsers and the other for everything else
(i believe that you would have to put it in the order that i have above)
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #3  
Old 01-06-2007, 04:26 PM
 
laxmiddie68 laxmiddie68 is offline
 

Member
  
Join Date: Jul 2005
Posts: 19
 

Default Re: CSS Hacks & Work-arounds

Hey did you ever figure out how to make that work?

I have a drop down all css menu that works in all IE browsers 5.5, 6, and normally 7 and firefox. It works fine in non litecommerce pages, but it gets messed up in the store pages only with IE 7. I tried {literal} tags in the template with no success.
__________________
Matt B.
MattRay Web Solutions
Lite Commerce 2.1 [win]
Reply With Quote
  #4  
Old 01-06-2007, 05:52 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: CSS Hacks & Work-arounds

you can try using "if lte IE 7" in the conditional statement above
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #5  
Old 01-06-2007, 06:01 PM
 
laxmiddie68 laxmiddie68 is offline
 

Member
  
Join Date: Jul 2005
Posts: 19
 

Default Re: CSS Hacks & Work-arounds

after messing around with the .tpl file I found it occurs when the smarty comments are inserted ...such as "<!-- [begin] -->" and "<!-- [/end] -->". But that is weird. The two don't seem to be connected and it is only IE 7. IE6 IE5.5 firefox are all good still.
__________________
Matt B.
MattRay Web Solutions
Lite Commerce 2.1 [win]
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:37 PM.

   

 
X-Cart forums © 2001-2020