Hi,
I’ve come across a strange issue with one of my views.
Simple login form,
<% form_tag do -%>
<p><label for="login">Login</label><br/>
<%= text_field_tag 'login' %></p>
<p><label for="password">Password</label><br/>
<%= password_field_tag 'password' %></p>
<p><%= submit_tag 'Log in' %></p>
<% end -%>
But browsers are rendering the text field input box huge.
It’s like a mini text area.
The only happens when I pass in ‘login’ as a parameter to
text_field_tag.
If I pass it password, the input box is rendered as a correct size.
Any ideas ?
Strange one so it is
2009/8/6 Gary C. [email protected]:
    <%= text_field_tag ‘login’ %>
The only happens when I pass in ‘login’ as a parameter to
text_field_tag.
If I pass it password, the input box is rendered as a correct size.
Have you had a look at the generated html (View, Page Source or
similar in browser) to see if it looks ok?
Also try copying the complete source and pasting into html checker at
The W3C Markup Validation Service in case something else on
the page is messing it up and confusing the browser.
Colin
firebug is your friend.
As colin suggested, viewing the source code in your browser will give
you a clue as to what is happening.
If you use firebug (plugin for firefox) to inspect element you will see
all the css, layout and source code, you can even edit the soirce code
as you look at it and when you are happy that you have what you need go
and change your files.
It’s just one of those tools that you can live without once you’ve used
it.
Thanks lads.
I’ll check that when I finish work.