开发者

Wrapping submit button in label element for cross browser compatibility and styling

开发者 https://www.devze.com 2023-02-03 05:37 出处:网络
Hi all I have been looking around as I am fed up with the lack of compatibility for styling submit buttons.

Hi all I have been looking around as I am fed up with the lack of compatibility for styling submit buttons.

I was looking at no other than facebook themselves开发者_JS百科 source.

They do something like this:

<label class="uiButton uiButtonLarge Post">
<input type="submit" value="Post" />
</label>

They set the css display for the label as an inline-block and then set padding etc..

Is this the best way to do it?

Or is there an even better way?

Thanks!


http://www.tripwiremagazine.com/2010/03/35-essential-submit-button-enhancements.html

This tutorials should be fine, sure they're not identical with FB but there are crossbrowser stylings to pure css. Hope that helps.

0

精彩评论

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