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

DIV problem displaying random images in IE/ Mozilla OK

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

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

Default DIV problem displaying random images in IE/ Mozilla OK

OK, here's the problem.

I have let this slide for a few months, but it's been getting on my nerves, as unfortunately people still use IE and I can't get a design element to work for one of my stores. It is a random 620 by 398 image that is inside the below script and DIV tags and it shows up beautifully in Firefox, but there is a 1px white line between the image and the bottom border. I've tried everything and can get it to work as a table, but not the script- it seems to only work like this ...

Does anyone see what may be causing this? It works, but not format wise???? Thanks for your assiatnce.

- Mike
Code:
<div align="center" style="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=\"MySite.com | MySiteBlahBlah ...\" title=\"Blah blah blah blah blah title here\" border=\"0\"></a>"; var rnumb = ""; var img = ""; rnumb += Math.floor(Math.random()*6); img = rnumb; if (img == "0") { document.write(b1dis+ "product.php?productid=52" +bdis+ "images/splash/splash_001.jpg\"" +edis); } if (img == "1") { document.write(b1dis+ "product.php?productid=53" +bdis+ "images/splash/splash_002.jpg\"" +edis); } if (img == "2") { document.write(b1dis+ "home.php?cat=1" +bdis+ "images/splash/splash_003.jpg\"" +edis); } if (img == "3") { document.write(b1dis+ "product.php?productid=327" +bdis+ "images/splash/splash_004.jpg\"" +edis); } if (img == "4") { document.write(b1dis+ "product.php?productid=335" +bdis+ "images/splash/splash_005.jpg\"" +edis); } if (img == "5") { document.write(b1dis+ "product.php?productid=395" +bdis+ "images/splash/splash_006.jpg\"" +edis); } // --> </script> {/literal}
__________________
4.1.9
Reply With Quote
  #2  
Old 05-04-2005, 05:45 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

can you post the HTML output from IE? or provide a link to view it.
__________________
ETInteractive.com
X-Cart 3.5.x
Reply With Quote
  #3  
Old 05-04-2005, 05:51 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default

This may not be related, but I remember IE putting a 1px whitespace under images that had a line feed after the IMG tag. Really weird, but was something that made me pull my hair out because "IT'S NOT SUPPOSED TO WORK THAT WAY!!!!"

Blasted IE.

e.g.
Code:
[img]image.png[/img]

That extra line feed after the image tag put a white space right under the image.
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote
  #4  
Old 05-04-2005, 07:06 AM
 
mffowler mffowler is offline
 

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

Default

Wait, it's fixed! Your post SS got me thinking about linespace and the DIV and literal tags needed to be on the same line verse carriage-returned. If only IE was as smart as Firefox. Or if everyone just switched already.

Thanks for pointing me in the right direction. This has been like this for months and I am sure users saw the flaw.

- 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 11:05 PM.

   

 
X-Cart forums © 2001-2020