X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   DIV problem displaying random images in IE/ Mozilla OK (https://forum.x-cart.com/showthread.php?t=13801)

mffowler 05-03-2005 08:53 PM

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}


ETInteractive.com 05-04-2005 05:45 AM

can you post the HTML output from IE? or provide a link to view it.

sstillwell@aerostich.com 05-04-2005 05:51 AM

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.

mffowler 05-04-2005 07:06 AM

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


All times are GMT -8. The time now is 10:52 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.