SOLVED

Re: Horizontal Radio Buttons

Go to solution
Robb_Barrett
Level 10

I've seen a couple of threads about making radio buttons horizontal but I've yet to get it to work. Can someone point me in the right direction?

Robb Barrett
1 ACCEPTED SOLUTION
Robb_Barrett
Level 10

That didn't work, but this did:

.mktoRadioList>label, .mktoRadioList>input {display: inline-block !important; margin-right: 1em !important;margin-left: .5em !important;}

.mktoForm input[type=radio] {float: none;}

Robb Barrett

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

YAYAYAYAY!!! I have been trying to figure this out for a while and finally googled the right words to get your answer!! yayay!! thank you!

Diego_Lineros2
Level 7

Wrap it in a field set and put that

<style>

fieldset input[type=radio] + label  { display: inline !important; margin-right:1.5em !important; margin-left: 0 !important;

}

fieldset input[type="radio"] {float: none !important;}

</style>

Robb_Barrett
Level 10

Didn't work for me in Chrome.

Robb Barrett
SanfordWhiteman
Level 10 - Community Moderator

OK, in this particular case I had done a quick FF check.  Interesting anomaly.

Robb_Barrett
Level 10

That didn't work, but this did:

.mktoRadioList>label, .mktoRadioList>input {display: inline-block !important; margin-right: 1em !important;margin-left: .5em !important;}

.mktoForm input[type=radio] {float: none;}

Robb Barrett
Anonymous
Not applicable

Rob, big thanks
Your answer helped me perfectly !!!!
Cheers

Anonymous
Not applicable

This worked well for setting up the radio buttons horizontally, but do you also know how to have the text appear above the button?

SanfordWhiteman
Level 10 - Community Moderator

I injected that CSS right into your page:

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

In the form you sent me:

LABEL[for="USCANHITRADPurchaseTiming"] ~ .mktoRadioList INPUT[type="radio"],

LABEL[for="USCANHITRADInquiryType"] ~ .mktoRadioList INPUT[type="radio"] {

    clear: none !important;

}

SanfordWhiteman
Level 10 - Community Moderator

Hey Robb --

Set up a form with a few buttons and post the link (so I don't have to create another form in my lab) and I'll show you how.