Fireworks / FireFox Problem
Hi,
I used fireworks to cut up an image and used the HTML code it created to upload in the content management system. It work fine in IE but I can not get it to work in Firefox. Any help would be very gratefully received. You can see a live link for it at http://www.pricerunner.co.uk/sony/index.html or the code is as follows:
<style>
.balloonstyle{ position:absolute; top: 100px; left: 0; padding: 5px; visibility: hidden; border:1px solid black; font:normal 12px Verdana; line-height: 18px; z-index: 5; background-color: white; font-color: #666666; width: 200px; /*Remove below line to remove shadow. Below line should always appear last within this CSS*/ filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135,Strength=5); }
</style>
<script LANGUAGE="JavaScript">
var disappeardelay=250 //tooltip disappear delay (in miliseconds)
var verticaloffset=0 //vertical offset of tooltip from anchor link, if any
var enablearrowhead=0 //0 or 1, to disable or enable the arrow image
var arrowheadimg=["arrowdown.gif", "arrowup.gif"] //path to down and up arrow images
var arrowheadheight=1 //height of arrow image (amount to reveal)
/////No further editting needed
var ie=document.all
var ns6=document.getElementById&&!document.all
verticaloffset=(enablearrowhead)? verticaloffset+arrowheadheight : verticaloffset
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e){
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (e.type=="mouseover")
obj.visibility="visible"
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
if (whichedge=="rightedge"){
edgeoffsetx=0
var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffsetx=dropmenuobj.contentmeasure-obj.offsetWidth
return edgeoffsetx
}
else{
edgeoffsety=0
var topedge=ie && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) //move up?
edgeoffsety=dropmenuobj.contentmeasure+obj.offsetHeight+(verticaloffset*2)
return edgeoffsety
}
}
function displayballoontip(obj, e){ //main ballooon tooltip function
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous tooltip?
dropmenuobj.style.visibility="hidden"
clearhidemenu()
//obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(obj.getAttribute("rel"))
showhide(dropmenuobj.style, e)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")+verticaloffset
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
if (enablearrowhead)
displaytiparrow()
}
function displaytiparrow(){ //function to display optional arrow image associated with tooltip
tiparrow=document.getElementById("arrowhead")
tiparrow.src=(edgeoffsety!=0)? arrowheadimg[0] : arrowheadimg[1]
var ieshadowwidth=(dropmenuobj.filters && dropmenuobj.filters[0])? dropmenuobj.filters[0].Strength-1 : 0
//modify "left" value depending on whether there's no room on right edge of browser to display it, respectively
tiparrow.style.left=(edgeoffsetx!=0)? parseInt(dropmenuobj.style.left)+dropmenuobj.offsetWidth-tiparrow.offsetWidth-10+"px" : parseInt(dropmenuobj.style.left)+5+"px"
//modify "top" value depending on whether there's no room on right edge of browser to display it, respectively
tiparrow.style.top=(edgeoffsety!=0)? parseInt(dropmenuobj.style.top)+dropmenuobj.offsetHeight-tiparrow.offsetHeight-ieshadowwidth+arrowheadheight+"px" : parseInt(dropmenuobj.style.top)-arrowheadheight+"px"
tiparrow.style.visibility="visible"
}
function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'; dropmenuobj.style.left=0; if (enablearrowhead) tiparrow.style.visibility='hidden'",disappeardelay)
}
function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
function reltoelement(linkobj){ //tests if a link has "rel" defined and it's the ID of an element on page
var relvalue=linkobj.getAttribute("rel")
return (relvalue!=null && relvalue!="" && document.getElementById(relvalue)!=null && document.getElementById(relvalue).className=="balloonstyle")? true : false
}
function initalizetooltip(){
var all_links=document.getElementsByTagName("a")
if (enablearrowhead){
tiparrow=document.createElement("img")
tiparrow.setAttribute("src", arrowheadimg[0])
tiparrow.setAttribute("id", "arrowhead")
document.body.appendChild(tiparrow)
}
for (var i=0; i<all_links.length; i++){
if (reltoelement(all_links[i])){ //if link has "rel" defined and it's the ID of an element on page
all_links[i].onmouseover=function(e){
var evtobj=window.event? window.event : e
displayballoontip(this, evtobj)
}
all_links[i].onmouseout=delayhidemenu}
}
}
if (window.addEventListener)
window.addEventListener("load", initalizetooltip, false)
else if (window.attachEvent)
window.attachEvent("onload", initalizetooltip)
else if (document.getElementById)
window.onload=initalizetooltip
</script>
<div id="breadcrumbs">
<ul>
<li><a href="/"><a href="/">PriceRunner</a></a>
<ul>
<li> > Sony Lounge</li>
</ul>
</li>
</ul>
</div>
<img src="http://i.pricerunner.com/images/i/sony/sony-logo-20090225" Style="float: right;">
<h1 id="top" style="font-size: 28px;">The <span style="color: #0082c3; font-weight: 800;">SONY</span> Product Lounge</h1><br>
<p>Lorem ipsum dolor sit amet consectetuer amet Proin convallis sed nec. Mus congue interdum Donec vel ac In molestie semper convallis condimentum. Felis faucibus Pellentesque quis auctor nunc eget auctor urna Nullam pulvinar. Libero lacinia urna arcu tempus odio metus urna urna at id. Dolor scelerisque tempus orci est Aenean et dui eu lorem hendrerit. Neque cursus Pellentesque.</p>
<table border="0" cellpadding="0" cellspacing="0" width="773">
<tr>
<td><img src="spacer.gif" width="97" height="1" border="0" /></td>
<td><img src="spacer.gif" width="138" height="1" border="0" /></td>
<td><img src="spacer.gif" width="181" height="1" border="0" /></td>
<td><img src="spacer.gif" width="17" height="1" border="0" /></td>
<td><img src="spacer.gif" width="207" height="1" border="0" /></td>
<td><img src="spacer.gif" width="133" height="1" border="0" /></td>
<td><img src="spacer.gif" width="1" height="1" border="0" /></td>
</tr>
<tr>
<td colspan="5"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r1_c1" width="640" height="68" border="0" /></td>
<td rowspan="5"><a href="" rel="balloon1"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r1_c6" width="133" height="500" border="0"/></a></td>
<td><img src="spacer.gif" width="1" height="68" border="0" /></td>
</tr>
<tr>
<td colspan="2"><div style="z-index:1000;"><a href="" rel="balloon2"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r2_c1" width="235" height="69" border="0" /></a></div></td>
<td><a href="" rel="balloon3"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r2_c3" width="181" height="69" border="0" /></a></td>
<td colspan="2"><a href="" rel="balloon4"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r2_c4" width="224" height="69" border="0" /></a></td>
<td><img src="spacer.gif" width="1" height="69" border="0" /></td>
</tr>
<tr>
<td rowspan="2"><a href="" rel="balloon5"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r3_c1" width="97" height="236" border="0" /></a></td>
<td rowspan="2" colspan="2" background="http://i.pricerunner.com/images/i/sony/sony-20080223_r3_c2" width="319" height="236">
< a href="" rel="balloon6">
<div class="video" style="position: relative; left:22px; top: -25px;">
<iframe src="http://www.rubix.co.uk/video/test.html" width="278" height="158" frameborder="0" scrolling="no"><p>Your browser does not support iframes.</p></iframe>
</div></a></td>
<td colspan="2"><a href="" rel="balloon7"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r3_c4" width="224" height="110" border="0" /></a></td>
<td><img src="spacer.gif" width="1" height="110" border="0" /></td>
</tr>
<tr>
<td rowspan="2"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r4_c4" width="17" height="253" border="0" /></td>
<td><a href="" rel="balloon8"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r4_c5" width="207" height="126" border="0" /></a></td>
<td><img src="spacer.gif" width="1" height="126" border="0" /></td>
</tr>
<tr>
<td colspan="3"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r5_c1" width="416" height="127" border="0" /></td>
<td><a href="" rel="balloon9"><img src="http://i.pricerunner.com/images/i/sony/sony-20080223_r5_c5" width="207" height="127" border="0" /></a></td>
<td><img src="spacer.gif" width="1" height="127" border="0" /></td>
</tr>
</table>
<!--Sample links-->
<div id="balloon1" class="balloonstyle" style="z-index: 2000">
<b>Sony SA-FT7ED</b> Speaker Package - from <b><span style="color: #0082c3;">£1208.36</span></b>.<br>Click to find out more...
</div>
<div id="balloon2" class="balloonstyle">
<b>Sony RDR-GX380</b> Recordable DVD Player - from <b><span style="color: #0082c3;">£184.99</span></b>.<br>Click to find out more...
</div>
<div id="balloon3" class="balloonstyle">
<b>Sony BDP-S350</b> Blu-ray DVD Player - from <b><span style="color: #0082c3;">£165.49</span></b>.<br>Click to find out more...
</div>
<div id="balloon4" class="balloonstyle">
<b>Sony HDR-SR11</b> Camcorders - from <b><span style="color: #0082c3;">£619.00</span></b>.<br>Click to find out more...
</div>
<div id="balloon5" class="balloonstyle">
<b>Sony LocationFree Player Pak</b> Media Center - from <b><span style="color: #0082c3;">£219.98</span></b>.<br>Click to find out more...
</div>
<div id="balloon6" class="balloonstyle">
<b>Sony Bravia KDL-40W4500</b> LCD Television - from <b><span style="color: #0082c3;">£963.64</span></b>.<br>Click to find out more...
</div>
<div id="balloon7" class="balloonstyle">
<b>Sony NAS-S55HDE</b> Giga Juke™ Hard Drive music systems - from <b><span style="color: #0082c3;">£399.99</span></b>.<br>Click to find out more...
</div>
<div id="balloon8" class="balloonstyle">
<b>Sony SCD-XE597</b> CD Player - from <b><span style="color: #0082c3;">£123.33</span></b>.<br>Click to find out more...
</div>
<div id="balloon9" class="balloonstyle">
<b>Sony SAW2500</b> Subwoofer - from <b><span style="color: #0082c3;">£176.05</span></b>.<br>Click to find out more...
</div>
greg posted this at 13:18 — 11th March 2009.
He has: 1,581 posts
Joined: Nov 2005
Hi, welcome to TWF
I've edited your post and wrapped your code in the forum's code tags (third icon from the right on the top of the post editing window).
As this forum allows HTML anchor code for links
<a href=>
, the links in your code where playing havoc with your forum post.I'm not sure if you intended the images to be displayed as images or the code, I wrapped them in the code tags but simply edit your post if you wanted them to be images.
____________
At first glance, it appears to be perhaps the table layout. Mainly the "colspan" you have.
I could be wrong, and will have a better look shortly.
EDIT: After further investigation, I managed to get the top two rows aligned better in Firefox by changing some of the colspans you have.
It's a bit clumsy the way you are using a table like that with cells in a row being the top part of an image, then cells in the row below being the bottom part of the image above it.
CSS DIV's would be better for what you are trying to accomplish, but of course understand you might be more familiar with tables.
One thing I found that does help, is alter your border="0" in the table to 2, it helps by highlighting where things are going wrong with alignment.
this code:
<table cellspacing="0" cellpadding="0" border="2" width="773">
Roxy posted this at 14:11 — 11th March 2009.
They have: 17 posts
Joined: Mar 2009
Hi,
Thank you for wrapping the code as I didn't mean the images to show.
I am happy with DIVs and SPANs, and haven't used tables for ages. However I used FireWorks to cut up the image and just exported the HTML. I have played around with it a bit more and have re-cut the image so am going to see if that works.
If all else fails I way just float all the products individually, z-index and relative position them, though I am not sure if this will make the JavaScript bubbles go underneath the images.
I will post back with my progress - I have to have the mock up ready for a meeting tomorrow, so it won't be long before you hear from me again.
Thanks again,
Roxy
greg posted this at 14:24 — 11th March 2009.
He has: 1,581 posts
Joined: Nov 2005
Looks like adding the DIV's sorted it.
It looks fine in my browser now - Ubuntu 8.10 and Firefox 3.0.7
The JS bubbles are fine, although I would "suggest" the floor-standing speaker bubble goes underneath the + sign or just to the right of the image somewhere. It's 'ok' as it is, but as it pops up under the full image, first time viewing I couldn't see it as the bottom of the table was the bottom of my screen.
Also, another note.. Don't know what it is, script or flash or whatever, but viewing your page is slow, and it uses a MASSIVE amount of CPU when I view the page.
Other than that, looks fine
Roxy posted this at 14:50 — 11th March 2009.
They have: 17 posts
Joined: Mar 2009
Sorry - adding which DIV sorted it? I managed to fix it by putting style="display: block;" in all the TD's instead of it just being a style in the header.
I originally had the videos embedded using our integrated video hosting platform, but the problem with is was that the JavaScript bubbles went underneath it, so I had to end up making it flash and then hosting it in an Iframe to avoid this.
I think what I might do is not have the video on this page, but make it appear that is is there, but when you click on it it takes you to another page to watch the video.
Thanks for all your help Greg :-X
greg posted this at 15:33 — 11th March 2009.
He has: 1,581 posts
Joined: Nov 2005
Roxy posted this at 13:06 — 17th March 2009.
They have: 17 posts
Joined: Mar 2009
Grrrrrrrr....... It is all broken again! I literally fixed it last week and checked it in all the browsers and it was working fine. Now it is not even working in IE. I have rolled back several versions and still not working.
I am never using fire works again!
greg posted this at 18:29 — 17th March 2009.
He has: 1,581 posts
Joined: Nov 2005
If it was working fine then something must have been changed in the code for it to break it.
Duplicated an ID or Class? Deleted or changed one? You created a new or changed a current global style?
Altered the main HTML code?
Roxy posted this at 16:18 — 23rd March 2009.
They have: 17 posts
Joined: Mar 2009
Someone in Sweden had updated the global style sheet, not just their regional one. Sorted at last though, but now looks like the clients aren't going to go with it after all. Typical!
greg posted this at 16:45 — 23rd March 2009.
He has: 1,581 posts
Joined: Nov 2005
You win some you lose some!
steven00 posted this at 13:26 — 9th September 2009.
They have: 1 posts
Joined: Sep 2009
Hi,
Nice article....Thanks for sharing your thoughts with us.I enjoyed well while reading your article.
Fireworks
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.