Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have created single select button group using radio button with label tag using css display: table and table-cell for text content exceed or overflow in each button. It's working fine all browsers (Chrome, Firefox & IE) expect Safari browser.

I am getting space between each button. I have tried some hacks and online solutions but i am not able to find/fix proper solution.

Screenshot: https://i.stack.imgur.com/oLsmo.png[^]

JSFiddle: Edit fiddle - JSFiddle[^]

What I have tried:

JSFiddle : Edit fiddle - JSFiddle[^]
Posted
Updated 16-Nov-18 4:07am

.selection-group .single-select {
    /* display: table; */
    /* font-size: 0; */
    display: inline-block;
    width: 100%;
}


.selection-group input + label
{
display: inline-block;
float: left;
}
 
Share this answer
 
Comments
Member 10700524 16-Nov-18 10:09am    
It's working partially, but when you add more text, the text not wrapping properly.

Please check below links:

Fiddle1: https://jsfiddle.net/tor9f82q/4/

Fiddle2: https://jsfiddle.net/tor9f82q/5/

Those things are working properly in all browsers except Safari.
It's working partially, but when you add more text, the text not wrapping properly.

Please check below links:

Fiddle1: Edit fiddle - JSFiddle[^]

Fiddle2: Edit fiddle - JSFiddle[^]

Those things are working properly in all browsers except Safari.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900