Why does font-size only work when I set background-color on a button?
- by Andrew Latham
I am in Rails 3.2.6, on Chrome.
I have the following code in my html.erb file:
<div id="beta">
<%= form_tag({}, {:id => "id_search"}) do %>
ID: <%= text_field_tag "beta_id" %>
<%= submit_tag "Go" %>
<% end %>
</div>
When I set the font-size to 24pt in my CSS file, the text field changes properly, but the button doesn't change at all. I pulled it up in my Developer Tools, and it was getting the CSS property, but just not changing its font size. Even when I put !important, nothing happened. I couldn't change the font-family either.
JSFiddle: http://jsfiddle.net/R5CXg/
Changing other properties worked. When I changed the background-color property, the button suddenly turned square instead of round, and popped into the correct font-size and font-family.
Why was this the case and how can I work around it?