Forum Moderators: open

Message Too Old, No Replies

FF iframe within div has a JS problem

firefox having issues with iframe js & css

         

al_u

12:18 am on Mar 19, 2010 (gmt 0)

10+ Year Member



I have a div 256px high containing an iframe 140px high. (see code below).
The iframe has an onclick="top.location='Testimonials.html';"
In Firefox 3.6, the area of the div above the iframe gets the css cursor hand property & the onclick action just fine, but below the iframe, (but still within the div), it's as if the onclick & css did not exist - no cursor hand & no onclick action.
No such problem in IE, no errors in the FF console & it validates as XHTML 1.0 Transitional//EN.
Stumped! Hope someone out there is smarter than me....




[size=2]<div style="background-image:url('electronic/customers.png');height:200px;width:265px;background-repeat:no-repeat;cursor:pointer;cursor:hand;" onclick="top.location='Testimonials.html';" title=" Read Our Customer Feedback "><iframe src="scrollingframe.html" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" style="border: 0;position:relative;top:30px;left:5px;cursor:pointer;cursor:hand;width:254px;height:140px;" allowtransparency="true"></iframe></div>[/size]

al_u

5:29 pm on Mar 19, 2010 (gmt 0)

10+ Year Member



Problem was the default position of the div (i.e.'static') - when 'position:relative' was added, all's well.