Solved

CSS Form Alignment....

Posted on 2009-03-30
2
305 Views
Last Modified: 2012-06-21
I use CSS to align my form w/o tables. It works great, but I want to change it so I can put radio button values on the same line next to each other. This is the code I was using:

#aligned label {position: absolute; text-align:right; width:135px;padding-bottom:4px;margin-bottom:4px; }
#aligned input,  #aligned textarea, #aligned select { margin-left: 155px;padding-bottom:4px;margin-bottom:4px; }
#aligned label.check, #aligned label.radio { position:relative; text-align:left; }

and I tried this:

#aligned radio.forminline  {margin-left: 5px;}

and then added a class forminline to my radio buttons, but it' didn't work.....

Any ideas?


0
Comment
Question by:interclubs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Expert Comment

by:Robin
ID: 24019001
Can you post the whole form html code?
0
 
LVL 11

Accepted Solution

by:
level9wizard earned 500 total points
ID: 24019050
What you want is to make your own class and then do this to the radio

#aligned input.myRadio
{
   //css here
}

and then in the htlm do:

<input type="radio" class="myRadio" ...etc />
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question