I use JQUERY in my ASP.NET MVC application for better user experience. I wonder if it is possible to group buttons together? Not option buttons but simple buttons. For example: is it possible to have buttonA + buttonB + button开发者_如何学JAVAC grouped together followed by some spaces followed bu buttonD + buttonE + buttonF grouped together? Thank you very much :)
If you are looking for a tool bar this http://jqueryui.com/demos/button/#toolbar link should be very helpful for you...
Also its useful if you have themes on your website ;)
html
<div class="group">
<button>Button A</button>
<button>Button B</button>
</div>
<div class="group">
<button>Button C</button>
<button>Button D</button>
</div>
js
`$('.group').buttonset();`
css
.group{margin-right: 20px;float: left;}
also check a demo here http://jsbin.com/aniye5/edit
If you just want some buttons to group and not use some fancy jQuery GUI, you can float:left
a ul
with li
elements next to each other. Something that is done very often.
For example: Check this website with firebug.
精彩评论