How to align vertical center label in bootstrap?

Hi Friends 👋,

Welcome To aGuideHub! ❤️

Today, I am going to show you. How to align vertical center label in bootstrap with code example.

Here, we will use .label class to make a customize bootstrap colors.


Let’s look at the following example to understand how it basically works:

<!doctype html>
<html lang="en">
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap CSS -->
    <link href="[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

    <div class="form-group">
      <div class="row">
          <div class="col-xs-3">
              <label for="class_type"><h2><span class=" label label-primary">Name</span></h2></label>
          <div class="col-xs-2">
              <select name="class_type" id="class_type" class="  form-control input-lg" style="width:200px" autocomplete="off">
                  <option >Rajvir</option>
                  <option >Ramcharan</option>
                  <option >Kishan</option>
                  <option >Radheshyam</option>
    <!-- Bootstrap Bundle with Popper -->
    <script src="[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>


Check the output of the above code example.

Bootstrap, Label

All the best 👍