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 6969131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:32:32+00:00 2026-05-27T16:32:32+00:00

I have three text inputs (2 input text, 1 textarea) and a submit button

  • 0

I have three text inputs (2 input text, 1 textarea) and a submit button inside a div with position:relative. The 3 text inputs and a submit button all have position:relative as well. The first 2 inputs (q and d) line up as expected, but the last two (t and qS) lie off to the right and don’t follow the expected CSS. I would like all of the textboxes and the submit button to line up under each other the same distance from the left side.

Markup:

 <form method='POST' action='ask.php'>  
        <input type='text' id='q' >
        <textarea id='d'></textarea>
        <input type='text' id='t'>
        <input type='submit' value='submit' id='qS'>
    </form>

CSS:

 #q{
 position: relative;
 top: 30px;
 left: 20px;
 width: 400px;
 border: 1px solid orange;
 font-size: 13px;
 }

 #d{
 position: relative;
 top: 60px;
 left: 20px;
 height: 100px;
 width: 400px;
 }

 #qS{
 position: relative;
  top: 20px;
 left: 20px;
 }

 #t{
 position: relative;
 top: 20px;
 left: 100px;
 }
  • 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-05-27T16:32:33+00:00Added an answer on May 27, 2026 at 4:32 pm

    Your css is quite messy. To get what you want delete all your CSS and replace your HTML with this…

     <form method='POST' action='ask.php'>  
            <p><input type='text' id='q' ></p>
            <p><textarea id='d'></textarea></p>
            <p><input type='text' id='t'></p>
            <p><input type='submit' value='submit' id='qS'></p>
        </form>    
    

    For further styling and spacing use CSS. There is no need to set anything to position:relative… and there’s no need to use top,left,right either. Simply use margin where needed. If you want to move everything together, set margin to your form element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET form with three text inputs, one each for Work Phone,
I have text file with something like first line line nr 2 line three
I have a div with a width of 200px. There is text inside that
I'm using jQuery, and I have a textarea. When I submit by my button
I have form: <form method='post' action='script.php'> <textarea id='main' name='text'></textarea> <input type='hidden' name='id' value='1'> <input
Scenario: I'm trying to intercept paste events inside a textarea/input text, and filter the
I have text input boxes. There is validation for each of the boxes using
I have three text boxes on the stage id=red, blue, green same as the
I have three column in my datagridview .One is text ,one is Combo and
I have the following three tables: alt text http://img16.imageshack.us/img16/5499/linqtosqlquery.jpg With LinqToSql I would like

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.