Form in one column and text paragraph in other column

1.3k views Asked by At

How can I have a form on one side of the container and a text-paragraph on the other side? I figured if I put it all in a container with one row of two columns it would work but for some reason, the paragraph text shows up under the form on the left side.

This is a screenshot of what's happening based on the code I have right now.

Img

<div class="container-section getintouch">
    <h1 class="text-center">Say hello?</h1>
    <div class="row">
      <div class="col-xs-6">

        <form>
            <div class="form-group">
              <input type="text" class="form-control no-border    
               placeholder="Email">
            </div>
            <div class="form-group">
              <input type="text" class="form-control no-border"     
              placeholder="Email">
            </div>
  <textarea class="form-control no-border" rows="5" id="comment"></textarea>
            </div>
          </form>

      </div>
      <div class="col-xs-6">
        <h3>Want to say hello? It's always nice meeting new people. Fill out 
            this form to the left and I'll reply to you as soon as I can :)     
        </h3>
      </div>
    </div>enter code here

.container-section{
  width: full;
  height: full;
  margin: 0 auto;
  padding: 100px;
  color: white;
}

.getintouch{
  background: #9dd1f1;
}

I just started learning to code so I apologize if this seems like a silly question. I searched around and couldn't find the answer anywhere.

Thank you in advance!

1

There are 1 answers

0
Praveen Kumar Purushothaman On BEST ANSWER

Learn HTML and CSS properly before asking any questions.

  1. There's no CSS rule that has a value full.
  2. Don't give padding on full width.
  3. You forgot to add a container class.
  4. Lots of invalid HTML, unclosed and stuff.

Snippet

.container-section {
  -margin: 0 auto;
  -color: white;
}
.getintouch {
  background: #9dd1f1;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<div class="container-section getintouch">
  <h1 class="text-center">Say hello?</h1>
  <div class="container">
    <div class="row">
      <div class="col-xs-6">
        <form>
          <div class="form-group">
            <input type="text" class="form-control no-border" id=formGroupExampleInput " placeholder="Name "">
          </div>
          <div class="form-group">
            <input type="text" class="form-control no-border" id=formGroupExampleInput2 " placeholder="Email "">
          </div>
          <div class="form-group">
            <textarea class="form-control no-border" rows="5" id="comment"></textarea>
          </div>
        </form>
      </div>
      <div class="col-xs-6">
        <h3>Want to say hello? It's always nice meeting new people. Fill out this form to the left and I'll reply to you as soon as I can :)</h3>
      </div>
    </div>
  </div>

Preview

preview

Output: http://jsbin.com/mepiripeju/edit?html,css,output