Solved

CSS Form Alignment....

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

735 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