Solved

CSS Form Alignment....

Posted on 2009-03-30
2
302 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
2 Comments
 
LVL 16

Expert Comment

by:robinu
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
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.…

831 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