table with td content at top and bottom - css

In a (bootstrap-based) HTML page I have a table.
In a table cell, I'd like some content that is top-aligned, and some other content in the same cell that is bottom-aligned (there generally is enough vertical space). How can this be achieved? What I'd like to avoid is to work with fixed pixel spacing.
A MWE is here:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.14.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/js/bootstrap.min.js"></script>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">H1</th>
<th scope="col">H2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div style="height: 100px; background-color: yellow"></div>
</td>
<td>
<div>top - aligned</div>
<div>
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

Please check out this. Do you want something like this?
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.14.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/js/bootstrap.min.js"></script>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">H1</th>
<th scope="col">H2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div style="height: 100px; background-color: yellow"></div>
</td>
<td>
<div class="">top - aligned</div>
<div class="mt-5">
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Here I have added margin top to the button. class="mt-5"

You may add a column
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.14.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/js/bootstrap.min.js"></script>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">H1</th>
<th scope="col" colspan="2">H2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div style="height: 100px; background-color: yellow" />
</td>
<td>
<div>top - aligned</div>
</td>
<td class="align-bottom text-right">
<div>
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
or use absolute position
.bottom-right {
bottom: 0;
right: 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.14.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/js/bootstrap.min.js"></script>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">H1</th>
<th scope="col">H2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div style="height: 100px; background-color: yellow" />
</td>
<td class="position-relative">
<div>top - aligned</div>
<div>
<button type="button" class="btn btn-primary btn-sm position-absolute bottom-right m-1">Bottom-right</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
If it is only a visual layout matter, rethink the structure without a table , possible example:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div class="container ">
<div class="container-fluid ">
<div class="row table-dark table-striped">
<div class="col-sm-6 p-0 border-bottom border-secondary">
<h2 class="px-3 border-bottom border-secondary">title 1</h2>
<div style="height: 100px;" class="m-3 bg-warning text-dark">100px</div>
</div>
<div class="col-sm-6 d-flex flex-column p-0 border-bottom border-secondary">
<h2 class="pr-3 border-bottom border-secondary m-0">title 2</h2>
<div class="pr-3">top - aligned</div>
<div class="text-right mt-auto p-3">
<div>
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</div>
</div>
<div class="col-sm-6 p-0 border-bottom border-secondary">
<div style="height: 150px;" class="m-3 bg-info ">150px</div>
</div>
<div class="col-sm-6 p-3 d-flex flex-column p-0 border-bottom border-secondary">
<div class="pr-3">top - aligned</div>
<div class="text-right mt-auto">
<div>
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</div>
</div>
</div>
</div>
</div>

It still would be nice to have a solution for a <table>, but I adopted the suggestion by #G-Cyrillus and used bootstrap classes to achieve this. If there is a better solution, please post, I will be happy to accept it.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery#3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.14.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/js/bootstrap.min.js"></script>
<title>Test</title>
</head>
<body>
<div class="container">
<div class="container-fluid" >
<div class="row">
<div class="col-6" style="background-color: grey">
<img src="x" height=100 />
</div>
<div class="col-6" style="background-color: yellow">
<div class="h-100 d-flex flex-column">
<div class="row">
content at top
</div>
<div class="row align-items-end justify-content-end flex-grow-1" style="background-color: orange">
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Related

datatable class="display nowrap" only working for active class

I have a question, I have 3 tab-pane with datatable in each one of it. I add display nowrap to it so it doesn't overflow to the right and just fill the card body. But funny enough the display nowrap only working for the first tab-pane or the default active class. Here is my code
<div class="tab-content" style="width:100%">
<div class="tab-pane fade show active col-12" id="PAKJatuhTempo1-view" role="tabpanel" aria-labelledby="home-tab">
<div>
<div id="DivPAKJatuhTempo1">
<div class="row" style="padding-top:20px;">
<div class="col-12">
<div class="main-card mb-3">
<div class="card-body border rounded">
<table id="TablePakJatuhTempoSJT" class="display nowrap" style="width:100%">
<thead style="text-align:center">
<tr>
<th>No</th>
<th>Nama Pengelola RM</th>
<th>Nama Debitur</th>
<th>Maksimum Kredit</th>
<th>Tanggal Jatuh Tempo PAK Review</th>
<th>Sebab Keterlambatan PAK</th>
<th>Langkah-Langkah Yang Telah/Akan Dilaksanakan</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade show col-12" id="PAKJatuhTempo2-view" role="tabpanel" aria-labelledby="home-tab">
<div>
<div id="DivPAKJatuhTempo2">
<div class="row" style="padding-top:20px;">
<div class="col-12">
<div class="main-card mb-3">
<div class="card-body border rounded">
<table id="TablePakJatuhTempoJTBI" class="display nowrap" style="width:100%">
<thead style="text-align:center">
<tr>
<th>No</th>
<th>Nama Pengelola RM</th>
<th>Nama Debitur</th>
<th>Maksimum Kredit</th>
<th>Tanggal Jatuh Tempo PAK Review</th>
<th>Sebab Keterlambatan PAK</th>
<th>Langkah-Langkah Yang Telah/Akan Dilaksanakan</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade show col-12" id="PAKJatuhTempo3-view" role="tabpanel" aria-labelledby="home-tab">
<div>
<div id="DivPAKJatuhTempo3">
<div class="row" style="padding-top:20px;">
<div class="col-12">
<div class="main-card mb-3">
<div class="card-body border rounded">
<table id="TablePakJatuhTempoJTBD" class="display nowrap" style="width:100%">
<thead style="text-align:center">
<tr>
<th>No</th>
<th>Nama Pengelola RM</th>
<th>Nama Debitur</th>
<th>Maksimum Kredit</th>
<th>Tanggal Jatuh Tempo PAK Review</th>
<th>Sebab Keterlambatan PAK</th>
<th>Langkah-Langkah Yang Telah/Akan Dilaksanakan</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
any solution how to make all the tab-pane display working with the display nowrap?

Bootstrap 4 - card overflow in small screen

in my application, I use a lot the bootcard .card class.
Only, very often when I switch to mobile view, I notice a big overflow, which causes a display bug, and my whole page is found shifted.
Which means that I have to change the code in my .card class each time to make sure everything fits even in mobile view. It's very weird
On large screen :
On small screen :
This is the code :
<div class="card mt-4">
<h5 class="card-header">
Abonnement
<div class="float-right">
<button class="btn btn-light btn-sm mb-1">Ne pas résilier l'abonnement</button>
</div>
</h5>
<div class="card-body">
<table class="table table-borderless">
<thead>
<tr>
<th>PRODUIT</th>
<th>PROCHAINE FACTURE</th>
<th>CRÉÉ LE</th>
</tr>
</thead>
<tbody>
<tr>
<td>
TETETE
<span class="badge badge-secondary">Annulation prévue 03/05/2020</span>
<br>
<p class="text-secondary">
basic
</p>
</td>
<td>
Pas de prochaine facture
</td>
<td>
03/04/2020
</td>
</tr>
</tbody>
</table>
</div>
</div>
Thanks for your help !
If it possible replace the table with columns.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid">
<div class="card mt-4">
<h5 class="card-header">
Abonnement
<button class="btn btn-light btn-sm mb-1 float-sm-right">Ne pas résilier l'abonnement</button>
</h5>
<div class="card-body">
<div class="row">
<div class="col-12 col-sm-4">
<h5>PRODUIT</h5>
TETETE
<span class="badge badge-secondary">Annulation prévue 03/05/2020</span>
<p class="text-secondary">
basic
</p>
</div>
<div class="col-12 col-sm-4">
<h5>PROCHAINE FACTURE</h5>
<p class="text-secondary">
Pas de prochaine facture
</p>
</div>
<div class="col-12 col-sm-4">
<h5>CRÉÉ LE</h5>
<p class="text-secondary">
03/04/2020
</p>
</div>
</div>
</div>
</div>
</div>
Add class table-responsive to the table:
body{ width: 360px; } /* Galaxy S */
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="card mt-4">
<h5 class="card-header">
Abonnement
<div class="float-right">
<button class="btn btn-light btn-sm mb-1">Ne pas résilier l'abonnement</button>
</div>
</h5>
<div class="card-body">
<table class="table table-borderless table-responsive">
<thead>
<tr>
<th>PRODUIT</th>
<th>PROCHAINE FACTURE</th>
<th>CRÉÉ LE</th>
</tr>
</thead>
<tbody>
<tr>
<td>
TETETE
<span class="badge badge-secondary">Annulation prévue 03/05/2020</span>
<br>
<p class="text-secondary">
basic
</p>
</td>
<td>
Pas de prochaine facture
</td>
<td>
03/04/2020
</td>
</tr>
</tbody>
</table>
</div>
</div>

Bootstrap 4.1 Cards Styling

I have this code:
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-header">Employee Information</div>
<div class="card-body">
<table class="table table-borderless">
<tbody>
<tr>
<td scope="row">First Name: </td>
<td>{{ $employee->first_name }}</td>
</tr>
<tr>
<td scope="row">Last Name: </td>
<td>{{ $employee->last_name }}</td>
</tr>
<tr>
<td scope="row">ID Number: </td>
<td>{{ $employee->id_number }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card">
<div class="card-header">External Training Records</div>
<div class="card-body">
External Training Records:
</div>
</div>
</div>
<div class="col-md-8 offset-md-4">
<div class="card">
<div class="card-header">Clients</div>
<div class="card-body">
Clients:
</div>
</div>
</div>
<div class="col-md-8 offset-md-4">
<div class="card">
<div class="card-header">Site</div>
<div class="card-body">
Sites
</div>
</div>
</div>
</div>
</div>
https://jsfiddle.net/aq9Laaew/206869/
I would like the two sections on the right (external training and clients) to be underneath one another (when on a desktop). How does one do that in Bootstrap?
I know very little about front-end development. This is a learning curve for me.
To achieve that using Bootstrap layout utility classes, all you need is to place all your cards into one column, instead of adding a row for each card:
<div class="row">
<div class="col-lg-4">
... your left column card here...
</div>
<div class="col-lg-8">
... rest of your cards here...
</div>
</div>
Working example:
.row {
background: #f8f9fa;
}
.col {
border: solid 1px #6c757d;
}
.card {
margin-top: 15px;
}
.card + .card:last-child {
margin-bottom: 15px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-5">
<div class="card">
<div class="card-header">Employee Information</div>
<div class="card-body">
<table class="table table-borderless">
<tbody>
<tr>
<td scope="row">First Name: </td>
<td>Jane</td>
</tr>
<tr>
<td scope="row">Last Name: </td>
<td>Doe</td>
</tr>
<tr>
<td scope="row">ID Number: </td>
<td>123456789123</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-8 col-md-7">
<div class="card">
<div class="card-header">External Training Records</div>
<div class="card-body">
External Training Records:
</div>
</div>
<div class="card">
<div class="card-header">Clients</div>
<div class="card-body">
Clients:
</div>
</div>
<div class="card">
<div class="card-header">Site</div>
<div class="card-body">
Sites
</div>
</div>
</div>
</div>
</div>
Please note your current question title doesn't relate too well to the actual problem. You're basically asking a layout utility question. Whatever you place in your layout has no relevance for solving/answering it.
I think this is what you want
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-header">Employee Information</div>
<div class="card-body">
<table class="table table-borderless">
<tbody>
<tr>
<td scope="row">First Name: </td>
<td>Jane</td>
</tr>
<tr>
<td scope="row">Last Name: </td>
<td>Doe</td>
</tr>
<tr>
<td scope="row">ID Number: </td>
<td>123456789123</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card">
<div class="card-header">External Training Records</div>
<div class="card-body">
External Training Records:
</div>
</div>
<div class="card">
<div class="card-header">Clients</div>
<div class="card-body">
Clients:
</div>
</div>
</div>
<div class="col-md-8 offset-md-4"></div>
<div class="col-md-8 offset-md-4">
<div class="card">
<div class="card-header">Site</div>
<div class="card-body">Sites</div>
</div>
</div>
</div>
</div>

Dealing with cols and bootstrap grid

Currently I have col-sm-5 and col-sm-7 grid on the page which looks like this
<section class="site-content site-section">
<div class="container">
<div class="row">
<div class="col-sm-5 site-block">
<table class="table table-bordered">
<tbody>
<tr>
<td><strong>test</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test:</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test:</strong></td>
<td class="text-right">test</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-7 site-block">
<h3 class="site-heading">
<p><strong>test </strong></p>
</h3>
<p><hr></p>
<p><strong>test</strong></p>
<div class="row">
<div class="col-sm-4">
<h3>test1</h3>
<hr>
<p><span class="glyphicon glyphicon-file"></span> test</p>
</div>
<div class="col-sm-4">
<h3>test2</h3> <hr>
<p><span class="glyphicon glyphicon-file"></span> test</p>
</div>
<div class="col-sm-4">
<h3>test3</h3>
<hr>
<p><span class="glyphicon glyphicon-file"></span> test </p>
</div>
</div>
</div>
</div>
</div>
</section>
For better understanding what is producing this grid here is the JSFIDDLE So now I want to move both col-sm-4 on the right side of site-heading in `col-sm-7. It is not so clear what I want so here is the image of that:
Please check this and see if is what you need. I have changed the main grid to col-sm-4 and col-sm-8 then added some inside.
<section class="site-content site-section">
<div class="container">
<div class="row">
<div class="col-sm-4 site-block">
<table class="table table-bordered">
<tbody>
<tr>
<td><strong>test</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test:</strong></td>
<td class="text-right">test</td>
</tr>
<tr>
<td><strong>test:</strong></td>
<td class="text-right">test</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-8 site-block">
<div class="row">
<div class="col-sm-6">
<h3 class="site-heading">
<p><strong>test</strong></p></h3>
<p><hr></p>
<p><strong>test</strong></p>
</div>
<div class="col-sm-4">
<h3>test</h3>
<hr>
<p><span class="glyphicon glyphicon-file"></span> test</p>
<h3>test</h3> <hr>
<p><span class="glyphicon glyphicon-file"></span> test</p>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3>test</h3>
<hr>
<div class="row">
<div class="col-md-3">
<div class="well">6</div>
</div>
<div class="col-md-3">
<div class="well">7</div>
</div>
<div class="col-md-3">
<div class="well">8</div>
</div>
<div class="col-md-3">
<div class="well">8</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
DEMO JSFIDDLE

Radio button not aligned properly

I am using bootstrap and i am new to it . I made this page but why my radio buttons are not aligned properly in left in small devices like iPhone4. Please tell me the reasonfor the same and thanks in advance.
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Acarrot Do! Sign Up</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/custom.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body data-spy="scroll" data-target=".affix" data-offset="50">
<header class="container-fluid">
<div class="row">
<div class="col-xs-3 col-sm-2 col-md-2"><img src="images/logo-small.png" style="max-width:70%;height:auto;"> </div>
<div class="col-xs-6 col-sm-8 col-md-8 text-center">
<h4>Do This. Get That.</h4>
</div>
<div class="col-xs-3 col-sm-2 col-md-2 text-right"> </div>
</td>
</tr>
</table>
</div>
</div>
</header>
<nav class="navbar">
<div class="container-fluid text-center navbar-static-top">
<p class="big" style="background-color:#524e4d;">Fill the form below to Sign Up</p>
</div>
</nav>
<!-- Tabs Ends -->
<div class="container-fluid">
<div class="row">
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
<div class="col-sm-10 col-md-8 col-lg-6"><span class="page-title">Sign Up</span></div>
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
</div>
</div>
<!-- Title Ends -->
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
<div class="col-sm-10 col-md-8 col-lg-6">
<div class="panel-body">
<p class="big">I am a</p>
<form>
<div class="form-group">
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted">
<input type="radio" name="optradio">
<span class="big col-xs-12 col-sm-12 col-md-4 col-lg-4 ">Student</span></label>
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted">
<input type="radio" name="optradio">
<span class="big col-xs-12 col-sm-12 col-md-4 col-lg-4">Teacher</span></label>
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted">
<input type="radio" name="optradio">
<span class="big col-xs-12 col-sm-12 col-md-4 col-lg-4">Parent</span></label>
</div>
<p class="big">Hello <span class="dark-green-text">Teacher,<br>
<br>
Please Use your school Email ID</span></p>
<div class="form-group">
<input class="form-control input-lg" id="Email" type="text"
style="background-color:#5e5653;border-bottom:1px solid #999;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;"
placeholder="School Email ID">
</div>
<div class="form-group">
<input class="form-control input-lg" id="password9" type="text" placeholder="Password"
style="background-color:#5c5651;border-bottom:1px solid #999;;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;">
</div>
<div class="form-group">
<input class="form-control input-lg" id="password" type="text"
placeholder="Confirm Password"
style="background-color:#5c5651;border-bottom:1px solid #999;;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;">
</div>
<div class="checkbox">
<label>
<input type="checkbox">
<p class="big">I have read the <a>Terms of Use</a> and <a>Privacy Policy</a></p>
</label>
</div>
<table style="width:100%;"
cellpadding="2" cellspacing="2">
<tr>
<td> </td>
</tr>
<tr>
<td style="text-align:center;"><a href="signup.html">
<button type="button" class="btn btn-main" style="width:125px;">Sign Up</button>
</a><br>
<br></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table style="text-align: center; width: 100%;"
cellpadding="2" cellspacing="2">
<tr>
<td width="45%"><img src="images/2px-divider.png"
style="width:100%; height:1px;"></td>
<td width="10%"><p class="big"">or</p></td>
<td width="45%"><img src="images/2px-divider.png"
style="width:100%; height:1px;"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50px"> </td>
</tr>
<tr>
<td style="text-align: center;"><a href="#"><img src="images/circles/icon-g+.png"><br>
Sign
Up with Google+</a></td>
</tr>
</table>
</form>
</div>
</div>
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
</div>
</div>
</div>
<!-- Content Ends -->
<footer class="container-fluid text-center"> About UsHow do! works<a href="contact.html">Contact
Us</a>
</li>
</ul>
</footer>
</body>
</html>
Remove this span from the label and write the text directly inside it
<span class="big col-xs-12 col-sm-12 col-md-4 col-lg-4 ">Student</span>
Set the grid column classes at the level of the <label> and not the nested <span> tag:
<div class="form-group">
<label class="radio-inline col-xs-12 col-sm-12 col-md-4 col-lg-4" style="border: 1px;border-color: red;border-style: dotted;display: inline-block;display: inline-block;"><input type="radio" name="optradio">
<span class="big">Student</span></label>
<label class="radio-inline col-xs-12 col-sm-12 col-md-4 col-lg-4" style="border: 1px;border-color: red;border-style: dotted;display: inline-block;"><input type="radio" name="optradio">
<span class="big">Teacher</span></label>
<label class="radio-inline col-xs-12 col-sm-12 col-md-4 col-lg-4" style="border: 1px;border-color: red;border-style: dotted;display: inline-block;"><input type="radio" name="optradio">
<span class="big">Parent</span></label>
</div>
See the given below edited code. It's solution I think.
Only you have to delete SPAN inside LABEL or else delete the classes of that SPAN
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Acarrot Do! Sign Up</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/custom.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body data-spy="scroll" data-target=".affix" data-offset="50">
<header class="container-fluid">
<div class="row">
<div class="col-xs-3 col-sm-2 col-md-2"><img src="images/logo-small.png" style="max-width:70%;height:auto;">
</div>
<div class="col-xs-6 col-sm-8 col-md-8 text-center"><h4>Do This. Get That.</h4></div>
<div class="col-xs-3 col-sm-2 col-md-2 text-right"> </div>
</div>
</header>
<nav class="navbar">
<div class="container-fluid text-center navbar-static-top">
<p class="big" style="background-color:#524e4d;">Fill the form below to Sign Up</p>
</div>
</nav>
<!-- Tabs Ends -->
<div class="container-fluid">
<div class="row">
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
<div class="col-sm-10 col-md-8 col-lg-6"><span class="page-title">Sign Up</span></div>
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
</div>
</div>
<!-- Title Ends -->
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
<div class="col-sm-10 col-md-8 col-lg-6">
<div class="panel-body">
<p class="big">I am a</p>
<form>
<div class="form-group">
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted"><input type="radio" name="optradio">
Student</label>
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted"><input type="radio" name="optradio">
Teacher</label>
<label class="radio-inline" style="border: 1px;border-color: red;border-style: dotted"><input type="radio" name="optradio">
Parent</label>
</div>
<p class="big">Hello <span class="dark-green-text">Teacher,<br><br>Please Use your school Email ID</span></p>
<div class="form-group">
<input class="form-control input-lg" id="Email" type="text"
style="background-color:#5e5653;border-bottom:1px solid #999;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;"
placeholder="School Email ID">
</div>
<div class="form-group">
<input class="form-control input-lg" id="password9" type="text" placeholder="Password"
style="background-color:#5c5651;border-bottom:1px solid #999;;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;">
</div>
<div class="form-group">
<input class="form-control input-lg" id="password" type="text"
placeholder="Confirm Password"
style="background-color:#5c5651;border-bottom:1px solid #999;;border-top:0px;border-left:0px;border-right:0px;border-radius:0px;font-size:20px;color:#7ed490;">
</div>
<div class="checkbox">
<label><input type="checkbox">
<p class="big">I have read the <a>Terms of Use</a> and <a>Privacy Policy</a></p></label>
</div>
<table style="width:100%;"
cellpadding="2" cellspacing="2">
<tr>
<td> </td>
</tr>
<tr>
<td style="text-align:center;"><a href="signup.html">
<button type="button" class="btn btn-main" style="width:125px;">Sign Up</button>
</a><br><br></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table style="text-align: center; width: 100%;"
cellpadding="2" cellspacing="2">
<tr>
<td width="45%"><img src="images/2px-divider.png"
style="width:100%; height:1px;"></td>
<td width="10%"><p class="big"">or</p></td>
<td width="45%"><img src="images/2px-divider.png"
style="width:100%; height:1px;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="50px"> </td>
</tr>
<tr>
<td style="text-align: center;"><a href="#"><img src="images/circles/icon-g+.png"><br>Sign
Up with Google+</a></td>
</tr>
</table>
</form>
</div>
</div>
<div class="col-sm-1 col-md-2 col-lg-3"> </div>
</div>
</div>
</div>
<!-- Content Ends -->
<footer class="container-fluid text-center">
About UsHow do! works<a href="contact.html">Contact
Us</a></li>
</ul>
</footer>
</body>
</html>

Resources