Page 1 of 2

make horizontal radio group span width of page

Posted: Thu Jul 24, 2014 12:33 pm
by Terry Gilliver

I have a radio group of two buttons in horizontal layout, i would like them to span the width of the screen and have equal width (50% each). I can't work out the right css to do this.

Image


make horizontal radio group span width of page

Posted: Thu Jul 24, 2014 12:55 pm
by Evgene Karachevtsev

Hello Terry,

Could you please add this css:
pre.ui-controlgroup-controls {
width:100%;
}
.ui-radio{
width:50%;
}/pre


make horizontal radio group span width of page

Posted: Thu Jul 24, 2014 11:41 pm
by Terry Gilliver

works perfectly, thanks


make horizontal radio group span width of page

Posted: Thu Sep 18, 2014 9:58 am
by Joe Sharples

Hi Evgene.

I'm looking to achieve the same but not for all radio button groups.
how would I do this for a specific radio button group of 3 buttons?

I tried the code below but it did not work.

code[name="mobileradiogroup_1"] .ui-controlgroup-controls {
width:100%;
}
.ui-radio {
width:33.33%;
}/code


make horizontal radio group span width of page

Posted: Thu Sep 18, 2014 2:40 pm
by Evgene Karachevtsev

Hello,

Your code works. Please check whether you wrote the name of the radiogroup correctly. Or you may add the class in More Properies for specific radiogroup. And then the css code will affect only the radiogroup you need.
CSS code is as follows:
pre.radiogroup .ui-controlgroup-controls {
width:100%;
}
.ui-radio {
width:33.33%;
}/pre
where .radiogroup this your class radiogroup


make horizontal radio group span width of page

Posted: Mon Sep 22, 2014 3:50 pm
by Joe Sharples

Hi Evgene

Thank you, this helped.
he final code that worked for 2 specific radiobuttongroups was:

Class Name: radiogroup1

pre .radiogroup1 .ui-controlgroup-controls {
width:100%;
}
.radiogroup1 .ui-radio {
width:33.33%;
} /pre

Class Name: radiogroup2

pre .radiogroup2 .ui-controlgroup-controls {
width:100%;
}
.radiogroup1 .ui-radio {
width:33.33%;
} /pre

the .className needed to be given before the .ui-radio as well as before .ui-controlgroup-controls


make horizontal radio group span width of page

Posted: Mon Sep 22, 2014 4:04 pm
by Kateryna Grynko

Hi Joe,

Thank you for sharing this!


make horizontal radio group span width of page

Posted: Tue Sep 23, 2014 12:45 am
by Joe Sharples

Sorry the last code in that was supposed to be:

Class Name: radiogroup2

pre.radiogroup2 .ui-controlgroup-controls {
width:100%;
}
.radiogroup2 .ui-radio {
width:33.33%;
} /pre


make horizontal radio group span width of page

Posted: Thu Feb 12, 2015 4:58 am
by EJLD

Hi There, thks to Joe whose css code helped me.

also, I'd like to have the txt inside each toggle centralized :)
any idea pls?

thks in advance,
Eric


make horizontal radio group span width of page

Posted: Thu Feb 12, 2015 11:20 am
by Maryna Brodina

Hi EJLD!

Definitely custom CSS http://devcenter.appery.io/documentat..., but I'm sure you know that... Unfortunately don't have any ready code snippet.