Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i put border to a form using bootstrap?

I have this code below, and i want to add a border to make like a box using bootstrap class ".border", but i can't figure out why is not working!. Is possible using bootstrap v4?

<div class="d-flex justify-content-center">
      <form>
        <div class="form-group row">
          <div class="col-sm-12">
            <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
          </div>
        </div>
        <div class="form-group row">
          <div class="col-sm-12">
            <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
          </div>
        </div>
        <div class="form-group row">
          <div class=" col-sm-12">
            <button type="submit" class="btn btn-primary">Sign in</button>
          </div>
        </div>
      </form>
    </div>
like image 612
Catarina Nogueira Avatar asked May 17 '17 17:05

Catarina Nogueira


People also ask

How do I add a border to a form?

Using Inline Style attribute Step 1: Firstly, we have to type the Html code in any text editor or open the existing Html file in the text editor in which we want to use the inline property for adding the border. Step 2: Now, place the cursor inside the opening tag of that text around which we want to add the border.

How do I put a border around a form in HTML?

HTML tags can be formatted using a style attribute. To add a border using the style attribute, add the border CSS inside the quotes after style=. In the example below, we surrounded a paragraph (<p></p>) with a solid red border that is 3 pixels wide.


1 Answers

Here is a pretty good combination for a bordered form with background color:

<form class = 'card p-3 bg-light'>

Looked good for my case.

like image 80
Yassir Khaldi Avatar answered Oct 12 '22 07:10

Yassir Khaldi