October 4th, 2008, 09:47 AM
Trying to get Radio Buttons to display horizontal
I have been reading through this message board for a few days now and have found great information that has helped me more than you could realize.
I am here with my own problem now though and hoping somebody will be able to help me.
When I took on this project I never would have imagined I would be spending this much time on trying to get radio buttons in a form to display correctly. The client wants four buttons listed horizontal, but for the life of me I can not get it to work.
I have tried putting them in an unordered list, separate floating divs but nothing has worked.
If anyone is able to point me in the right direction on how to get the radio buttons to list horizontal in css I would really appreciate it. The site I am working on has approximately ten different forms that all need the buttons listed this way.
Thank You in advance for any help..I look forward to spending time on this site in the future.
October 4th, 2008, 10:20 AM
Form controls are naturally inline elements, so they lay out horizontally.
Try this bit of code:
That will give you three buttons, yes, no, and ??? in a single row.
What are you doing that fails to give these results? Code?
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.
My html and css workshop
, demos and tutorials.
Ask a better question
, get a better answer.
October 4th, 2008, 10:28 AM
Thank you Gary!
I think the fact that I have been up all night working on this had turned my brain into nothing. The error was right in front of me the entire time. I had my label tag in the css set to clear: left, but I also had it float: left. Looking at your example had reminded me to check my label tag.
I am sure I will be back later because I am have a problem somewhere else on the site I am working on. Hopefully soon I will be able to spend time here helping others, but today is all about working