You are viewing limited content. For full access, please sign in.

Question

Question

Center radio buttons under text

asked on August 6, 2014

 How would I center the side-by-side radio buttons underneath the text?

 

I've tried using a css class and setting the margin but I'm not sure how to target just the radio buttons.

 

Thanks!

0 0

Answer

SELECTED ANSWER
replied on August 8, 2014 Show version history

Try something this. In this example #q15 is the ID for my radio button field, which has two options, Yes and No, displayed in two columns.

#q15 {width:325px;}
#q15 .cf-field, #q15 .cf-label {width: 100% !important; text-align:center;}
#q15 .choice {width: 25%;}

 

 

3 0

Replies

replied on August 6, 2014

Have you tried changing up the value for how many buttons to display in one row? Try 3 or 4 value, even though you have only Yes and No, it'll provide better spacing.

0 0
replied on August 6, 2014

I guess I dont really need spacing between them, I was just wondering how to center them.

0 0
replied on August 6, 2014

Is the following not acceptable with the settings pictured after the first screenshot?

 

 

Settings:

0 0
replied on August 6, 2014

I can manage with that, I was just wondering if I could keep them closer to each other but have them centered underneath the text. Everything else on the page is centered and I think it would look better if it was. 

 

Thanks for the idea though! I was actually going to do that if I couldnt find a way to accomplish what I want.

0 0
SELECTED ANSWER
replied on August 8, 2014 Show version history

Try something this. In this example #q15 is the ID for my radio button field, which has two options, Yes and No, displayed in two columns.

#q15 {width:325px;}
#q15 .cf-field, #q15 .cf-label {width: 100% !important; text-align:center;}
#q15 .choice {width: 25%;}

 

 

3 0
replied on August 8, 2014

Thanks Eric exactly what I needed!

0 0
replied on August 8, 2014

You're welcome!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.