Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:47:47+00:00 2026-06-13T04:47:47+00:00

I am new to CSS and have been trying to create a web form

  • 0

I am new to CSS and have been trying to create a web form with the radio buttons aligned next to text fields. However, in Firefox the radio boxes look fine, but when I check in Safari the radio boxes are in the middle of the text fields.

The CSS looks like this:

   input#answers
{
     display: block;
    height: 31px;
    left: 87px;
    position: relative;
    top: 0px;
    width: 350px;
}

input[type="radio"]
{
    display: inline- block;
    height: 20px;
    left: 249px;
    position: relative;
    top: -30px;
    vertical-align: middle;
}

and the HTML like this:

    <form id="quizCreator" name="quizCreator" method="post" action="quiz.maker.php">
    <label><span><img src="images/quizcreatorText.ques.png" hspace="79px" vspace="70px" class="titles"  /></span>      <br />
      <input type="text" name="question" id="question" />
    </label>
    <label><img src="images/quizcreatorText.ans.png" hspace="79px" vspace="70px" class="titles" id="ans" />      <br />
      <input type="hidden" name="creator" value="myform" />
      <br />
      <input type="text" name="answer1" id="answers" />
    </label>
    <label>
      <input type="radio" name="radio" id="radio1" value="radio1" />
    </label>

    <label>
      <input type="text" name="answer2" id="answers" />
    </label>
    <label>
      <input type="radio" name="radio" id="radio3" value="radio2" />
    </label>

    <label>
      <input type="text" name="answer3" id="answers" />
  </label>  
    <label>
     <input name="radio" type="radio" class="radio" id="radio3" value="radio3" />
  </label>  

    <label>
      <input type="text" name="answer4" id="answers" />
    </label>
    <label>
      <input name="radio" type="radio" id="radio4" value="radio4" />
    </label>
    <span><input  type="image" src="images/quiznameText.next.png"  name="nextPage" id="nextPage"  class="nxtbutton" /></span>
</form>

I’ve tried using relative positioning and margins, but while it fixes the problems in Safari, Firefox then looks wrong. Is there a way to make them both work as I want with a single set of code? (And what about MSIE?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:47:48+00:00Added an answer on June 13, 2026 at 4:47 am

    You should not be using relative positioning for this.

    The proper structure is something like this (not sure if you want the text before or after):

    <div class="answers">
    <ul>
        <li><label>your text</label><input type="radio" /></li>
        ...repeat...
    </ul>
    </div>
    

    CSS:

    .answers ul, .answers li {
        list-style-type:none;
        margin:0;
        padding:0;
    }
    
    .answers li {
        clear:both
    }
    
    .answers label {
        display:block;
        float:left;
        width:100px;
    }
    
    .answers input {
         display:block;
         float:left;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pretty new at CSS but have been learning, doing my moms small
So, I'm new to dynamic web design (my sites have been mostly static with
I am very new to javascript and ajax/jquery and have been working on trying
I'm fairly new to Compass, but I have been trying to use Compass in
Hello guys! I have been trying to create a if/else statement code in jQuery
I'm still new to CSS but I've been trying to find the answer to
I have a php form and also the css code. I am trying to
I have been requested to create a simple form with JavaScript validation code. I
I have make a new dropdown navi in css . Chrome, firefox, safari is
I have a Marionette.ItemView that uses a CSS class to style new items differently:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.