Image problem with Opera.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Image problem with Opera.

Post by JellyFish »

First, open Opera 9.01 if you have it. Then go to http://www.htmledit.squarefree.com and enter this into the first frame:

Code: Select all

<table cellspacing="0" cellpadding="0" border="1" width="0"><tr><td width="0"><img src="http://google.com/images/logo.gif" height="50" width="" /></td></tr></table>
Now as you may see the image leaves some space in the table that, in my opinion, isn't supposed to be there. Is this an Opera bug or is it on my end. And if it is on mine, then how would I fix this?

I post another topic on this but I didn't get the results I was hoping for. So I'm at it agian! :D

Thanks for reading and your help is appreciated.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

It's kinda getting under my skin. Why is it doing that?!?!?!
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

In my Opera 8.54 I doesn't work at all. I get this "-", and that alone, in the second frame. I could upgrade to 9.1 and try it again if you like.

Also please don't bump within a 24 hours of your last message; it is in violation of the forum rules. Thanks :)
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Yes I'd appreciate it. I think opera 8 doesn't even support http://htmledit.squarefree.com and with opera 8 I don't think it had this problem.

And sorry about the post. Where I'm living it's been a day.
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

It's opera, not the javascript....

Opera has <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> poor support for rich html editing. Hence why most wysiwyg editors don't work in opera
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

JellyFish wrote:And sorry about the post. Where I'm living it's been a day.
It's not "a day." It's literally 24 hours, not 13 hours.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

feyd wrote:
JellyFish wrote:And sorry about the post. Where I'm living it's been a day.
It's not "a day." It's literally 24 hours, not 13 hours.
I never said it was. :D


Other then that. Is there no fix for this problem? Should I just not support opera?
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

My fix:

Code: Select all

<html>
<head>
<script>
function onload(newheight)
{
var img = document.getElementById("image");

img.style.width = ((img.offsetWidth * newheight) / img.offsetHeight);
}
</script>
</head>
<body onload="onload(30)">
<table border="1" cellspacing="0" cellpadding="0" bgcolor="999999">
<tr>
<td>
<img id="image" src="http://google.com/images/logo.gif"/>
</td>
</tr>
</table>
</body>
</html>
It seems to work well. I could use this which is what I'm going to do. But I figured I'd post it for everyone to see the fix and replies concerning criticism.

Also, I don't believe this is a bump if it's a post about the solution. PM me about this.
Post Reply