Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes HTML, CSS and JavaScript and the fly likes Resizing an input in Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Resizing an input in Firefox" Watch "Resizing an input in Firefox" New topic

Resizing an input in Firefox

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

I've tried to use the cross-browser X-Library, as stated in Ajax in Action, chapter 4 page 155.

When clicking on a div element, I replace the content of a td by an input tag.
Using xLeft, xTop, xWidth and xHeight, I move and resize the input, but its height is too small.
I pass the height of the original td to xHeight : xHeight(editor, xHeight(td));

It works with IE, but not with Firefox

I checked the size with Firebug's Inspector:
original td element : 108px, 19.2px
input : 102px, 10px
[ September 01, 2006: Message edited by: Satou kurinosuke ]

[My Blog]
All roads lead to JavaRanch
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Nobody experienced this resizing problem ?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62269

Or perhaps nobody familiar with the x-library...

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Anay Nayak

Joined: Aug 15, 2006
Posts: 26
Does your table have cellpadding? that might result in different behavior in IE and firefox.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

No cellpadding and no style used. I've set className of trs and tds, but I'm not using any style sheets.
I agree. Here's the link:
subject: Resizing an input in Firefox