jh100000
2006-Aug-13 12:15 UTC
[Rails] why do text_fields appear smaller in IE than other browsers?
In testing my application on different browsers, I''ve noticed a few differences:- a password_field :size=>20 is smaller than a text_field :size=>20 on Internet Explorer. They are the same on Firefox and Safari. makes my login box look silly. the same can be seen on the login screen for this forum. the password box is a little shorter on IE6. more annoying however is I have a view with two large text_areas sided-by-side and a text_field above them both spanning the full width of both text_areas. If I size everything to look nice on Safari and Firefox, then on IE it looks as though the text_field is too small, only making it about 2/3rds of the way across. Its not a major problem, but saying that IE is (unfortunately) the most widely used browser, I should make things look nice on it. If I make things bigger to sit nice in IE then they will be too big and look really silly in IE and Firefox. As I say, in the grand scheme of things, not a major problem, just a cosmetic niggly annoyance! If someone has a solution I''d be very grateful. --John -- Posted via http://www.ruby-forum.com/.
Stephan Wehner
2006-Aug-13 17:15 UTC
[Rails] Re: why do text_fields appear smaller in IE than other brows
Maybe a matter of browser defaults? Try http://meyerweb.com/eric/thoughts/2004/09/15/emreallyem-undoing-htmlcss/ http://www.google.com/search?q=css+remove+all+defaults Stephan -- Posted via http://www.ruby-forum.com/.
James Schementi
2006-Aug-13 20:19 UTC
[Rails] Re: why do text_fields appear smaller in IE than other brows
jh100000 wrote:> In testing my application on different browsers, I''ve noticed a few > differences:- > > a password_field :size=>20 is smaller than a text_field :size=>20 on > Internet Explorer. They are the same on Firefox and Safari. makes my > login box look silly. the same can be seen on the login screen for this > forum. the password box is a little shorter on IE6. > > more annoying however is I have a view with two large text_areas > sided-by-side and a text_field above them both spanning the full width > of both text_areas. If I size everything to look nice on Safari and > Firefox, then on IE it looks as though the text_field is too small, only > making it about 2/3rds of the way across.Using CSS to set their width. Rails is actually constructing the input tag with a "width" on it, which from a designers POV, should be the stylesheet''s job. You could give them fixed widths or a percentage, but either or this CSS is what you want to give your input fields and textareas equal size. Make sure to play around with the numbers I gave ... form input { width: 200px; } form textarea { width: 300px; } -- Posted via http://www.ruby-forum.com/.
heri rakotomalala
2006-Aug-14 22:42 UTC
[Rails] why do text_fields appear smaller in IE than other browsers?
use css for your input and text_area boxes, to get similar width like for example : input, textarea { width:300px} -- ______________ Heri R. http://sprinj.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060814/10c04431/attachment.html