开发者

Should I choose <button> element or css buttons?

开发者 https://www.devze.com 2022-12-27 03:31 出处:网络
Ok, here\'s the thing. I\'ve done a webpage which contains forms and so I added buttons aselements and this works great. I created their own css classes and use graphics as background images for each

Ok, here's the thing. I've done a webpage which contains forms and so I added buttons as elements and this works great. I created their own css classes and use graphics as background images for each of them. All working great (these are submit buttons btw)

Anyway, I've also got a jQuery script from before that takes all a href hyperlinks and add content from a set div from an external file and adds to a div in my current page, all in one animation. But this would probably not work with form buttons?

In any case I need to be able to have these buttons work as traditional hyperlinks anyway. So what do I do?

I thought about using css-buttons alltogether, but I'm not able to have them stack vertically. Using float left or right just put the buttons outside of their parent containers (probably a different fix for that).

But in any case, using css buttons, that wouldn't work as a submit button for the forms anyway would it? Should I perhaps use both form buttons and css buttons? 开发者_如何学PythonWhat do you do?


<button> elements.

You should never use links to submit data, users with javascript disabled won't be able to use them, crawlers can submit data accidentally, etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消