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

  • Home
  • SEARCH
  • 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 8013961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:47:12+00:00 2026-06-04T19:47:12+00:00

I want to align the 3 input elements on the right, above each other.

  • 0

I want to align the 3 input elements on the right, above each other. And the textarea on the left. Just like this: http://cl.ly/Gvzo
How do I make it work?

<div id="contact">
<form action="php/contact/contactengine.php" method="post">
<fieldset>

<input id="Name" name="Name" placeholder="Enter your full name" type="text">                        

<input id="Email" name="Email" placeholder="Enter your email address" type="email">
                    
<input type="submit" name="submit" value="Send your message">                              

<textarea id="message" name="Message" placeholder="What's on your mind?"></textarea>

</fieldset>
</form>
</div>

My CSS:

contact {

width: 670px;

}

input {

float:right;
width: 251px; 
height: 50px; 
padding: 0px 20px 0px 20px; 
margin: 0 0 20px 0;   
background: #fcfcfc;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border:1px solid #d6d6d6;
box-shadow:inset 0 0 4px #d6d6d6;
-moz-box-shadow-inset: inset 0 0 4px #d6d6d6;
-webkit-box-shadow: inset 0 0 4px #d6d6d6;
font-size: 13px; 
font-weight:bold; 
color: #2a2a2a;  

}

textarea {

float:left;
width: 251px; 
height: 170px; 
padding: 12px 20px 12px 20px; 
margin: 0px; 
background: #fcfcfc;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border:1px solid #d6d6d6;
box-shadow:inset 0 0 4px #d6d6d6;
-moz-box-shadow-inset: inset 0 0 4px #d6d6d6;
-webkit-box-shadow: inset 0 0 4px #d6d6d6;
font-size: 13px;
font-weight:bold; 
color: #2a2a2a;  
resize:none;

}

input[type=submit] {

float:right;
border:none;
font-size:16px;
width: 293px; height: 51px;
float: right; 
padding: 7px 20px 10px 10px; 
margin:0px;
background: url(../../img/contactsendbutton.png) no-repeat;
cursor: pointer;
color:#fff;
text-shadow:1px 1px 1px #000;

}

  • 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-04T19:47:15+00:00Added an answer on June 4, 2026 at 7:47 pm

    I edited this answer because it wasn’t entirely accurate.
    First of all, the way you identify a div by its ID in CSS is by placing a ‘#’-character in front of it.

    The order in which you place your elements is relevant when using float. When you first create the elements on the right, they are placed next to eachother, starting from the right, until it doesn’t fit. In this case (since the left textarea hasn’t been created) it stops when it reaches the other side of the div that contains it.

    If you create the left textarea first, the right floating elements can’t be placed next to each other, so they will be placed underneath each other.

    You always have to keep in mind the margin, width and the width of its parent.

    In code it should be a little like this:
    HTML:

    <div id="contact">
            <form action="php/contact/contactengine.php" method="post">
                <fieldset>
    
                        <textarea id="message" name="Message" placeholder="What's on your mind?"></textarea>
    
                        <input id="Name" name="Name" placeholder="Enter your full name" type="text">                        
    
                        <input id="Email" name="Email" placeholder="Enter your email address" type="email">
    
                        <input type="submit" name="submit" value="Send your message">
    
    
    
                </fieldset>
            </form>
        </div>
    

    CSS:

      #contact {
            width: 670px;
            }
    
            input {
            float:right;
            width: 251px; 
            height: 50px; 
            padding: 0px 20px 0px 20px; 
            margin: 10px;   
            background: #fcfcfc;
            border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            border:1px solid #d6d6d6;
            box-shadow:inset 0 0 4px #d6d6d6;
            -moz-box-shadow-inset: inset 0 0 4px #d6d6d6;
            -webkit-box-shadow: inset 0 0 4px #d6d6d6;
            font-size: 13px; 
            font-weight:bold; 
            color: #2a2a2a;  
            }
    
            textarea {
    
            float:left;
            width: 251px; 
            height: 170px; 
            padding: 12px 0px 12px 20px; 
            margin: 10px; 
            background: #fcfcfc;
            border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            border:1px solid #d6d6d6;
            box-shadow:inset 0 0 4px #d6d6d6;
            -moz-box-shadow-inset: inset 0 0 4px #d6d6d6;
            -webkit-box-shadow: inset 0 0 4px #d6d6d6;
            font-size: 13px;
            font-weight:bold; 
            color: #2a2a2a;  
            resize:none;
            }
    
            input[type=submit] {
    
            float:right;
            border:none;
            font-size:16px;
            width: 251px; height: 50px;
            float: right; 
            padding: 7px 20px 10px 10px; 
            margin:10px;
            background: url(../../img/contactsendbutton.png) no-repeat;
            cursor: pointer;
            color:#fff;
            text-shadow:1px 1px 1px #000;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering the following : http://jsfiddle.net/Johnny5/EC8kK/ I would like the input button to align right
I want to align the text input field to align vertically I have two
This is the code. I want to align text at bottom <p style=background:#eee;font-size:1.3em;color:#022662;height:116px> <img
how to copy an object with some elements? I want to copy this object,
I'm new to jQuery but want to use this form validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ In
how can active text-align: right; only for placeholder? <input type=text name=airline_search style=direction: ltr; border:
i want to align text box to right in cell of table. it is
How can I align the input and select form elements in my test case
How can I align button right next to my input text. Example here HTML
I want to align to inputs next to eachother, these select inputs are inside

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.