File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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: 63544

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

[Asking smart questions] [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.
jQuery in Action, 3rd edition
subject: Resizing an input in Firefox
It's not a secret anymore!