I keep getting the message “Submit Query” on top of my image when I use image_submit_tag. I want to get rid of this. The image and hover image show up correctly, though.
<div class="action">
<%= image_submit_tag "", :class => "acctSubmit" %>
</div>
Here is my css for the class:
.acctSubmit{
display: block;
background: url('createaccount_button.png') no-repeat 0 0;
height: 43px;
width: 197px;
}
.acctSubmit:hover {
background-position: 0 -43px;
}
Let me know if I can provide anything else!
Why not use a
button_taginstead and then style the<button>as needed? You’re seeing the usual “missing image” text because you’re using an<img>tag without asrcattribute, a properly styled<button>would be a better choice:Your existing CSS should work fine but you might need some adjustments to get the desired visual effect (depending on what sort of CSS resetting you’re doing).