I am building a site right now that has multiple themes. All I have to do to change the theme is change the css file. The only part that I am having a hard time changing is the images I'm using for submit buttons. There are probably about 10-15 buttons that change color when you hover over them using javascript. I'm using
To have images as submit buttons. Is there a more css-friendly way of making my submit buttons images so that these images will change when I change my css file (theme)? Thanks guys!
Alright, here's the only solution I've come up with as of right now, but I didn't get much sleep last night, so does anybody see anything wrong with this approach? (from a usability stand-point)
Kieran Huggins wrote:what about the <input type="image" src="" /> element? it's an image that acts as a submit button, and built in to the x/html form spec.
Which is what I'm currently using, but it lacks the ability to be changed via css.
While I agree with that article, I work at a marketing firm, and unfortunately the way things look come first here. Also, I am not trying to style a form control. I'm trying to style an anchor tag.
You can style an input tag as well, though. Use the same method that you posted earlier (the CSS background), sans the javascript, and set transparency on the object to 100% transparent and you have a submit button that is still clickable, but styled to whatever you like.
Ninja, one thing I don't understand is, why have both an anchor tag and a button/input element? isn't it one or the other? Something is either a link to something else or it is a form element. In your case it seems like you're building a form, so you should use a valid form element, button or input.
matthijs wrote:Ninja, one thing I don't understand is, why have both an anchor tag and a button/input element? isn't it one or the other? Something is either a link to something else or it is a form element. In your case it seems like you're building a form, so you should use a valid form element, button or input.
I think you are all misunderstanding me. I'm fine with using an input element... SHOW me how I could do that... the whole reason behind me posting the question here was to get an answer on HOW to do it... silly geese!
Takes care of all browsers. Ranges from 0-1 (0-100 for filter), 0 being normal, 1(100) being invisible (but still the box is still rendered so as not to screw up positioning).
That way you can set transparency of the input button itself, but it still remains clickable as long as your background image for the button is visible (the background still displays, the button itself does not).
The Ninja Space Goat wrote:While I agree with that article, I work at a marketing firm, and unfortunately the way things look come first here. Also, I am not trying to style a form control. I'm trying to style an anchor tag.
Ok, help me understand this. If you are styling an anchor tag, why are you using a form control inside of it? or better yet, what effect are you after?