Solved

CSS Form Alignment....

Posted on 2009-03-30
2
299 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now