Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSS Form Alignment....

Posted on 2009-03-30
2
Medium Priority
?
310 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 2000 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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

916 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