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

CSS problem in IE, Mozilla fine

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-22-2005, 04:03 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default CSS problem in IE, Mozilla fine

I have a changing image in the welcome.tpl that is wrapped in a <DIV> tag with inline CSS. In IE, there is a 1px white space at the bottom of my image.
Code:
<div align="center" style="background-color:#FFFFFF; height:398px; padding:none; border-width:1px; border-style:solid; border-color:#E1E7E8"> {literal} <script language="javascript"> <!-- var b1dis = "<a href=\""; var bdis = "\"><img src=\""; var edis = " width=\"620\" height=\"398\" alt=\"Image ALT Tag Here\" title=\"Image Title Here\" border=\"0\"></a>"; var rnumb = ""; var img = ""; rnumb += Math.floor(Math.random()*2); img = rnumb; if (img == "0") { document.write(b1dis+ "product_url/product.php?productid=52" +bdis+ "http://image_url/image1.jpg\"" +edis); } if (img == "1") { document.write(b1dis+ "product_url/product.php?productid=53" +bdis+ "http://image_url/image2.jpg\"" +edis); } // --> </script> {/literal} </div>
Does anyone know how to fix that inline CSS, so it doesn't have the space at the bottom in IE?

Thanks!

Mike
__________________
4.1.9
Reply With Quote
  #2  
Old 03-22-2005, 04:16 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

I don't know enough about CSS to give you exact code, but look into margin.
Reply With Quote
  #3  
Old 03-22-2005, 04:21 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

I just put the rest of the code up, as I tried using a table and the same thing happened, thus, I think it is in the javascript vs. the CSS.

The code is for a rotating image that links to a product (reduced to only show 2 images here). Mozilla displays this as is, but IE leaves a 1px white area between the image and the border (bottom only). I tried to specify height, but no luck ... ???

Thanks,

Mike
__________________
4.1.9
Reply With Quote
  #4  
Old 03-23-2005, 06:25 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Have you tried, <div style="display:inline;"> or perhaps wrapping the code in {strip} ... {/strip} tags, if those don't work it may be the fact your wrapping javascript in the div tag.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #5  
Old 03-23-2005, 12:59 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Thanks Boomer. Neither of those did the trick. I changed the DIV tags to table and the 1px space was still at the bottom of the image, so it must be in how the javascripted random image is displayed by IE (w/ an added border). Without the border everything looks fine.

Perhaps I'll try a nested table or DIV (didn't work) .... back to the drawing board. Too bad everyone doesn't use Firefox.

- mike
__________________
4.1.9
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 03:37 PM.

   

 
X-Cart forums © 2001-2020