Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to use input tag into table – table td full size of column

i’m trying to use input tags into table without any border to the input tag

        <table class="table table-bordered">
            <thead>
              <tr class="bg-info">
                <th>first name</th>
                <th>last name</th>
                <th>college</th>
                <th>department</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td><input type="text" class="form-control"></td>
                <td><input type="text" class="form-control"></td>
                <td><input type="text" class="form-control"></td>
                <td><input type="text" class="form-control"></td>
              </tr>
            </tbody>
          </table>

i want to remove this image the blank lines , and make input tag full size of the column ? is it possible please , trying to implement something like this

bootstrap 4

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

thank you ..

>Solution :

Just remove the default padding foreach cell and default border of form-control

<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style>
/* remove the padding of cell */
table.table tr td {
  padding:0;
}


/* remove the border of input */
input.form-control, input.form-control:focus {
  border:0;
  box-shadow:none;
}
</style>
</head>
<table class="table table-bordered">
  <thead>
    <tr class="bg-info">
      <th>first name</th>
      <th>last name</th>
      <th>college</th>
      <th>department</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><input type="text" class="form-control"></td>
      <td><input type="text" class="form-control"></td>
      <td><input type="text" class="form-control"></td>
      <td><input type="text" class="form-control"></td>
    </tr>
  </tbody>
</table>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading