OZONE Asylum
Forums
DHTML/Javascript
Opera redrawing table width
This page's ID:
29013
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
It seems to work fine if you size properly the TD and TH. Right now you have:[code]td,th { width:32px; height:32px; padding:1px; border:2px; } td img { width:32px; height:32px; } [/code]Remember that the [url=http://www.w3.org/TR/REC-CSS2/box.html#box-dimensions]CSS Box Model[/url] defines the width/height including the margins, padding and borders. Therefore the available width/height of the TD/TH is 32-(2+1)*2 = 26px. By placing a 32x32 IMG in the TD you confuse the rendering engine. Ok it should be able to deal with that, and it actually does if you force a reflow. But setting the width/height of the image to 26px should do the trick. You should also specify the line-height of the TD/TH to 26px; May I ask you which editor you use to write your JS, CSS, (X)HTML ? They look painful to maintain. Indenting will help you, and others, a lot. JS-wise, I would avoid the use of [i]innerHTML[/i] at all cost. Browser vendors have implemented it on their own so far. But there is no official specification for it. In the current case it'll be fine but it can lead to arbitrary script execution. To change or add text content, prefer the use of TEXT Nodes and manipulate their nodeValue. Your [i]Array.prototype.indexOf[/i] method should return -1 when [i]obj[/i] is not found in the Array. I wonder why you use an IMG in the TD. Just use an empty TEXT Node. And if you want nice looking X and O, use the TDs as [url=http://alistapart.com/articles/sprites]CSS sprites[/url]. Hope that helps, [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 03-04-2007 15:25)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »