Notice: A non well formed numeric value encountered in /hp/bk/ab/xl/www/Secrets/wordpress/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /hp/bk/ab/xl/www/Secrets/wordpress/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

When I've designed our company Homepage, we had from one to three buttons to present for each of our apps, depending the case. I wanted to avoid using separate buttons for aesthetic reasons because to me, a unique “capsule” look was more elegant and interesting to use. So I went for the so called “segmented Controls” solution. Most of the time, it's a simple horizontal button look made of multiple segments. Note that it could be vertical.
[tkp_image width="960" zoom="no" alt="Segmented Controls on TheKeptPromise homepage"]TKPHomepageExtract.jpg[/tkp_image]

Here's how to achieve this look in full CSS

The Segmented Controls look is nice to build menus or multiple buttons that visually works when next to each other.
No matter the number of elements you'll add to your group, the look you'll could design for the first, the last, and the in between elements will always apply without having to add any specific class on them.


On the HTML side, it's fairly simple, just create a parent element (“.taz_sgmtGrp” on my case) that will contain all your segmented buttons (“.taz_sgmtBtn”).

On the CSS side, the best you know this language, the most you'll be able to play around.


Check-out the CSS code of each style variants. Depending on what you want to achieve, you'll have to style only the buttons or both the buttons and their parent. Also, some designs will better work if a button never jump to next line because of a narrow window width.

See the Pen Segmented Controls by Édouard Puginier (@Tazintosh) on CodePen.light