How to create custom horizontal radio buttons with CSS?


Tags: css,forms

Problem :

I want to create radio buttons or other type of controls that will act like this:

[_value1_] [value2] [value3]

Value1 is selected, so it looks like pressed button or selected link (bold, no underline) and other elements are active buttons/links. When user select another value - state is changed. I can handle this event manually, question is - what plugin or existing css/js combination should I use to achieve this?

I am pretty sure that this type of controls have a name, but can't think out what is this. I have tried to search for custom style radio buttons, as functionality is the same, but failed. Also I have tried some other names such as switch buttons, but it's not what I want. It's also very similar to tabs, but tabs usually styled as something that require underline div attached. So I am looking for "radio button meet tabs" css/js solution.

Can you help me to name this control, if you know it's name, or find plugin/existing code that can help me to achieve my goal?

The question is not how to create this type of functionality myself, I can do it, but it's rather strange that there are no existing solutions and I want to help people in same situation, also may be existing solutions design can be better than I can invent myself, because I am not a designer.

Answer

This type of controls can be found as "Simplified CSS Tabs" or "CSS Mini Tabs", but they require some additional code to work as expected.

Also, this type of functionality can be found in Google as jQuery UI radio buttons transformed into a button set and Yahoo UI Button Control: Radio Buttons



Solution :

http://jqueryui.com/demos/button/#radio

works done for ya bud :)


    CSS Howto..

    How to make bevel and Embosed effect to button in CSS 3 for web-kit based browsers?

    how to invoke css file in jquery

    How to change css by using tag or class name in typescript?

    How to set element in css at fixed position

    How add “cover”/“shadow” on div?

    How do you switch the cursor to a pointer cursor when hovering over the bars in a Kendo UI bar chart

    How to rotate a chart 90 degrees including the text values?

    How to use CSS to create a matrix of cells, and not use HTML tags at all

    How do you get a css box to extend the entire width of the browser window?

    show the div inside that div next to it

    how to change a css of an input if the value of it is not empty in angularJS

    How can display these elements in line?

    Navigation Bar - Each button is at a seperate line, how do I fix that?

    css how to stretch center div to fill allowable area

    How to use CSS in Bootstrap to load a logo in the nav-brand class and have it centred?

    How to Change CSS of Custom Template JointJS Element?

    How to Assign on demand CSS Styles to some div or class?

    How to change the color of Bootstrap links

    How to create an HTML CSS Page with Header, Footer and Content

    How to select the first occurrence of an HTML element in CSS that does not have a specific class?

    How do you add PHP to CSS?

    How to get rid of scroll bars/arrows in Wordpress, when using font style called 'Pre'

    how to grow height with the amount of text in css?

    How to hide the button keeping the position? [duplicate]

    How to test CSS selector performance?

    How to align text vertically equal top CSS

    How to add CSS to an if else statement in PHP

    How to keep css content position when zooming in and out?

    MeteorJs: how to add multiple js and css file based on templates.?

    How to modify this JQuery CSS into my view?