Profile Card HTML - html

image image2I'm trying to build a profile card in Bootstrap 3 and I'm having trouble getting the image to fit into the card. I think I can do this easier if I link to image in the css but I have many profile cards with all different people so I think keeping the image link in the HTML is better in this case.
Here's how I'd like it:
Any help is greatly appreciated. Thanks!
body {
font-family: 'Poppins';
overflow: hidden;
}
.navbar-inverse {
background-color: #fff !important;
border-color: #ffffff !important;
border-bottom: 1px solid #979797 !important;
}
#media (min-width: 768px){
.navbar {
border-radius: 0px !important;
}
}
.color-1{
color: #FCB900;
}
.sidebar{
color: #FCB900;
font-size: 21px;
float: left;
padding: 10px 5px;
cursor: pointer;
margin: 0 10px;
}
.logo a{
color: #424242 !important;
}
.logo{
background: white;
margin: 10px;
border: 1px solid #979797;
padding: 5px 20px;
font-size: 14px;
font-weight: 600;
}
.logo-a{
padding: 0 !important;
font-size: 13px !important;
}
/* Sidebar CSS */
.sidebar-logo{
background: white;
margin: 10px;
border: 1px solid #979797;
padding: 10px 20px;
font-size: 14px;
width: 50%;
margin-left: 10%;
text-align: center;
font-weight: 600;
}
.sidebar-title{
margin-left: 10%;
font-size: 12px;
}
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #fcb900;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 12px 8px 10px 25px;
text-decoration: none;
font-size: 14px;
color: #101010;
display: block;
transition: 0.3s;
}
.sidenav a:hover {
color: #101010;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 15px;
font-size: 25px;
margin-left: 50px;
}
.cart-icon{
font-size: 16px;
}
/*------------------------Profile Account----------------------------*/
.widget-author {
margin-bottom: 58px;
}
.author-card {
position: relative;
padding-bottom: 48px;
background-color: #fff;
box-shadow: 0 12px 20px 1px rgba(64, 64, 64, .09);
}
.author-card .author-card-cover {
position: relative;
width: 100%;
height: 100px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.author-card .author-card-cover::after {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
opacity: 0.5;
}
.author-card .author-card-cover > .btn {
position: absolute;
top: 12px;
right: 12px;
padding: 0 10px;
}
.author-card .author-card-profile {
display: table;
position: relative;
margin-top: -85px;
padding-right: 15px;
padding-bottom: 16px;
padding-left: 20px;
z-index: 5;
}
.author-card .author-card-profile .author-card-avatar, .author-card .author-card-profile .author-card-details {
display: table-cell;
vertical-align: middle;
}
.author-card .author-card-profile .author-card-avatar {
width: 85px;
border-radius: 50%;
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, .15);
overflow: hidden;
}
.author-card .author-card-profile .author-card-avatar > img {
display: block;
width: 100%;
}
.author-card .author-card-profile .author-card-details {
padding-top: 50px;
padding-left: 15px;
}
.author-card .author-card-profile .author-card-name {
margin-bottom: 2px;
font-size: 14px;
font-weight: bold;
}
.author-card .author-card-profile .author-card-position {
display: block;
color: #8c8c8c;
font-size: 12px;
font-weight: 600;
}
.author-card .author-card-info {
margin-bottom: 0;
padding: 0 25px;
font-size: 13px;
}
.author-card .author-card-social-bar-wrap {
position: absolute;
bottom: -18px;
left: 0;
width: 100%;
}
.author-card .author-card-social-bar-wrap .author-card-social-bar {
display: table;
margin: auto;
background-color: #fff;
box-shadow: 0 12px 20px 1px rgba(64, 64, 64, .11);
}
.btn-style-1.btn-white {
background-color: #fff;
}
.list-group-item i {
display: inline-block;
margin-top: -1px;
margin-right: 8px;
font-size: 1.2em;
vertical-align: middle;
}
.mr-1, .mx-1 {
margin-right: .25rem !important;
}
.list-group-item.active:not(.disabled) {
border-color: #e7e7e7;
background: #fff;
color: #ac32e4;
cursor: default;
pointer-events: none;
}
.list-group-flush:last-child .list-group-item:last-child {
border-bottom: 0;
}
.list-group-flush .list-group-item {
border-right: 0 !important;
border-left: 0 !important;
}
.list-group-flush .list-group-item {
border-right: 0;
border-left: 0;
border-radius: 0;
}
.list-group-item.active {
z-index: 2;
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
.list-group-item:last-child {
margin-bottom: 0;
border-bottom-right-radius: .25rem;
border-bottom-left-radius: .25rem;
}
a.list-group-item, .list-group-item-action {
color: #404040;
font-weight: 600;
}
.list-group-item {
padding-top: 16px;
padding-bottom: 16px;
-webkit-transition: all .3s;
transition: all .3s;
border: 1px solid #e7e7e7 !important;
border-radius: 0 !important;
color: #404040;
font-size: 12px;
font-weight: 600;
letter-spacing: .08em;
text-transform: uppercase;
text-decoration: none;
}
.list-group-item {
position: relative;
display: block;
padding: .75rem 1.25rem;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid rgba(0,0,0,0.125);
}
.list-group-item.active:not(.disabled)::before {
background-color: #ac32e4;
}
.list-group-item::before {
display: block;
position: absolute;
top: 0;
left: 0;
width: 3px;
height: 100%;
background-color: transparent;
content: '';
}
#media screen and (max-height: 450px) {
.sidenav {
padding-top: 15px;
}
.sidenav a {
font-size: 15px;
}
}
#exTab1 .tab-content {
color : #FCB900;
background-color: #fff;
padding : 5px 15px;
}
#exTab2 h3 {
color : #FCB900;
background-color: #428bca;
padding : 5px 15px;
}
/* remove border radius for the tab */
#exTab1 .nav-pills > li > a {
border-radius: 0;
}
/* change border radius for the tab , apply corners on top*/
#exTab3 .nav-pills > li > a {
border-radius: 4px 4px 0 0 ;
}
#exTab3 .tab-content {
color : white;
background-color: #428bca;
padding : 5px 15px;
}
/* Sidebar CSS */
.navbar-inverse .navbar-nav>li>a:hover {
color: #333;
}
.banner{
background-image: url('img/banner.jpg');
background-position: center center;
background-size: 100%;
margin: 0;
width: 100%;
height: 250px;
}
#media (min-width: 320px) and (max-width: 600px) {
.logo{
border: 1px solid #fff;
}
.head{
border-bottom: 0px solid #fff !important;
}
.header-right{
display: none !important;
}
.logo-media{
background: white;
border: 1px solid #979797;
padding: 5px 20px;
font-size: 14px;
width: 50%;
text-align: center;
font-weight: 600;
}
.no-margin{
margin-top: 0px !important;
margin-bottom: 0px;
}
.icon{
position: absolute !important;
top: 11px;
right: 0px;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Travelling | Account Settings </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="css/css.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<nav class="navbar navbar-inverse head">
<div class="container-fluid">
<span style="" onclick="openNav()" class="sidebar">☰</span>
<div class="navbar-header logo">
<a class="logo-media" href="#">Logo</a>
</div>
<div id="mySidenav" class="sidenav">
×
<div class="sidebar-logo">
<a class="logo-a" href="#">Logo</a>
</div>
<span class="sidebar-title">My Account</span>
<span class="glyphicon glyphicon-home p-r-10"></span> Home
<span class="glyphicon glyphicon-road p-r-10"></span> My Booking
<span class="glyphicon glyphicon-envelope p-r-10"></span> Messages
<span class="glyphicon glyphicon-user p-r-10"></span> Account
<hr style="display: block; height: 1px;border: 0; border-top: 1px solid black;margin: 1em 0; padding: 0; }">
<span class="sidebar-title">Settings</span>
Language
<hr style="display: block; height: 1px;border: 0; border-top: 1px solid black;margin: 1em 0; padding: 0; }">
<span class="sidebar-title">Information</span>
Customer Service
<hr style="display: block; height: 1px;border: 0; border-top: 1px solid black;margin: 1em 0; padding: 0; }">
<span class="fa fa-sign-in p-r-10" aria-hidden="true"></span>Login
<span class="fa fa-user-o p-r-10" aria-hidden="true"></span>Sign Up!
</div>
<ul class="nav navbar-nav navbar-right no-margin">
<li class="icon"><span class="glyphicon glyphicon-shopping-cart color-1 cart-icon "></span></li>
<li class="header-right">Login</li>
<li class="header-right">Sign Up</li>
</ul>
</div>
</nav>
<div class="container mt-5">
<div class="row">
<div class="col-lg-4 pb-5">
<!-- Account Sidebar-->
<div class="author-card pb-3">
<div class="author-card-cover">
<!-- <a class="btn btn-style-1 btn-white btn-sm" href="#" data-toggle="tooltip" title="" data-original-title="You currently have 290 Reward points to spend"><i class="fa fa-award text-md"></i> 290 points</a> --></div>
<div class="author-card-profile">
<div class="author-card-avatar"><img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="Daniel Adams">
</div>
<div class="author-card-details">
<h5 class="author-card-name text-lg">Daniel Adams</h5><span class="author-card-position">Joined February 06, 2017</span>
</div>
</div>
</div>
<div class="wizard">
<nav class="list-group list-group-flush">
<a class="list-group-item" href="#">
<div class="d-flex justify-content-between align-items-center">
<div><i class="fe-icon-heart mr-1 text-muted"></i>
<div class="d-inline-block font-weight-medium text-uppercase">Account Setting</div>
</div>
</div>
</a>
<a class="list-group-item" href="#">
<div class="d-flex justify-content-between align-items-center">
<div><i class="fe-icon-heart mr-1 text-muted"></i>
<div class="d-inline-block font-weight-medium text-uppercase">My Booking</div>
</div>
</div>
</a>
<a class="list-group-item" href="#">
<div class="d-flex justify-content-between align-items-center">
<div><i class="fe-icon-tag mr-1 text-muted"></i>
<div class="d-inline-block font-weight-medium text-uppercase">Wish List</div>
</div>
</div>
</a>
</nav>
</div>
</div>
<!-- Profile Settings-->
<div class="col-lg-8 pb-5">
<!-- <form class="row">
<div class="col-md-6">
<div class="form-group">
<label for="account-fn">First Name</label>
<input class="form-control" type="text" id="account-fn" value="Daniel" required="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="account-ln">Last Name</label>
<input class="form-control" type="text" id="account-ln" value="Adams" required="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="account-email">E-mail Address</label>
<input class="form-control" type="email" id="account-email" value="daniel.adams#example.com" disabled="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="account-phone">Phone Number</label>
<input class="form-control" type="text" id="account-phone" value="+7 (805) 348 95 72" required="">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="account-pass">New Password</label>
<input class="form-control" type="password" id="account-pass">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="account-confirm-pass">Confirm Password</label>
<input class="form-control" type="password" id="account-confirm-pass">
</div>
</div>
<div class="col-12">
<hr class="mt-2 mb-3">
<div class="d-flex flex-wrap justify-content-between align-items-center">
<div class="custom-control custom-checkbox d-block">
<input class="custom-control-input" type="checkbox" id="subscribe_me" checked="">
<label class="custom-control-label" for="subscribe_me">Subscribe me to Newsletter</label>
</div>
<button class="btn btn-style-1 btn-primary" type="button" data-toast="" data-toast-position="topRight" data-toast-type="success" data-toast-icon="fe-icon-check-circle" data-toast-title="Success!" data-toast-message="Your profile updated successfuly.">Update Profile</button>
</div>
</div>
</form> -->
<h1>Account Settings </h1>
<div id="exTab1">
<ul class="nav nav-pills">
<li>
Personal Information
</li>
<li>Travel
</li>
<li>Security
</li>
</ul>
<div class="tab-content clearfix">
<div class="tab-pane" id="1a">
<form class="row">
<div class="col-md-4">
<div class="form-group">
<label for="First Name">First Name*</label>
<input class="form-control" type="text" id="account-fn" placeholder="First Name" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="Last Name">Last Name*</label>
<input class="form-control" type="text" id="account-ln" placeholder="Last Name" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="gender">Gender</label>
<select class="form-control" id="sel1" placeholder="Gender">
<option>Male</option>
<option>Female</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="First Name">First Name*</label>
<input class="form-control" type="text" id="account-fn" placeholder="First Name*" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="Last Name">Last Name*</label>
<input class="form-control" type="text" id="account-ln" placeholder="Last Name*" required="">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="Passport No.">Passport No.</label>
<input class="form-control" type="password" id="account-pass">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Date of Birth">Date of Birth</label>
<input class="form-control" type="date" value="2011-08-19" id="example-date-input">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="Country">Country</label>
<select class="selectpicker countrypicker form-control" data-flag="true" ></select>
</div>
</div>
<div class="col-12">
<hr class="mt-2 mb-3">
<div class="d-flex flex-wrap justify-content-between align-items-center">
<button class="btn btn-style-1 btn-primary" type="button" data-toast="" data-toast-position="topRight" data-toast-type="success" data-toast-icon="fe-icon-check-circle" data-toast-title="Success!" data-toast-message="Your profile updated successfuly.">Update Profile</button>
</div>
</div>
</form>
</div>
<div class="tab-pane" id="2a">
<h3>We use the class nav-pills instead of nav-tabs which automatically creates a background color for the tab</h3>
</div>
<div class="tab-pane" id="3a">
<h4> Change Password </h4>
<form>
<div class="form-group">
<label for="email" style="color:#2EC4B6">Current Password *</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Current Password">
</div>
<div class="form-group">
<label for="email" style="color:#2EC4B6">New Password *</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-group">
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Confirm Password">
</div>
<button type="submit" class="btn" style="background: #FCB900; color:#fff;">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}
</script>
<script type="text/javascript">
$(function () {
$('#datetimepicker1').datetimepicker();
});
</script>
</body>
</html>

Maybe you should consider something like this! :)
.author-card-shape {
width: 85px;
height: 85px;
border-radius: 50%;
overflow: hidden;
}
.author-card-img {
max-width: 100%;
height: auto;
}
<figure class="author-card-shape">
<img class="author-card-img" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="Daniel Adams">
</figure>

Related

form-row overlapping the other div flex on the navigation

when i try to scroll the form the form-row content overlap on the navigation.
i am trying to make a form using bootstrap. but when i am adding a form-row or grid element for horizontal fields, the content or that form-row block overlap on my navigation panel on scrolling.
how can i make my form blocks below my navigation on scrolling.
body{
width:100%;
position: relative;
background-color: aliceblue;
display: flex;
margin: 0;
padding: 0;
}
#menu {
background-color: rgb(1, 9, 54);
width:300px;
height: 100%;
position: fixed;
top: 0;
left: 0;
}
#menu .logo{
display: flex;
align-items: center;
color: aliceblue;
padding: 30px 0 0 30px;
justify-content: flex-start;
}
#menu .logo img {
width: 60px;
margin-right: 15px;
border-radius: 50%;
}
#menu .items {
margin-top: 40px;
}
#menu .items li {
list-style-type: none;
padding: 15px 0;
transition: 0.3s ease;
}
#menu .items li:hover{
background: #254893;
cursor: pointer;
}
#menu .items li:nth-child(1){
border-left: 4px solid white;
}
#menu .items li i{
color: blanchedalmond;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
font-size: 16px;
margin: 0 16px 0 25px;
}
#menu .items li:hover i,
#menu .items li:hover a {
color : #f3f4f6;
}
#menu .items li a{
text-decoration: none;
color: rgb(134, 141, 151);
font-weight: 300px;
transition: 0.3s ease;
}
#interface {
width: calc(100% - 300px);
margin-left: 300px;
position: relative;
}
#interface .navigation {
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 15px 30px;
border-bottom: 3px solid blue;
position: fixed;
width: calc(100% - 300px);
}
#interface .navigation .search {
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10px 14px;
border: 1px solid #d7dbe6;
border-radius: 4px;
}
#interface .navigation .search input {
border: none;
outline: none;
font-size: 14px;
}
#interface .navigation .search i {
margin-right: 14px;
}
#interface .navigation .profile {
display: flex;
justify-content: flex-start;
align-items: center;
margin-right: 25px;
}
#interface .navigation .profile i {
margin-right: 20px;
font-size: 19px;
font-weight: 400;
}
#interface .navigation .profile img{
width: 30px;
height: 30px;
object-fit: cover;
border-radius: 50%;
}
.i-name {
color: #444a53;
padding: 30px 30px 0 30px;
font-size: 24px;
font-weight: 700;
margin-top: 70px;
}
.values {
padding: 30px 30px 0 30px;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.values .val-box {
background: #f3f4f6;
width: 235px;
padding: 16px 20px;
border-radius: 5px;
display: flex;
justify-content: flex-start;
align-items: center;
}
.values .val-box i {
font-size: 25px;
width: 60px;
height: 60px;
line-height: 60px;
border-radius: 50%;
text-align: center;
color: #fff;
background-color: #254893;
margin-right: 15px;
}
.values .val-box i:nth-child(1) {
background-color: rgb(3, 114, 114);
}
.values .val-box i:nth-child(2) {
background-color:rgb(80, 231, 181);
}
.values .val-box i:nth-child(3) {
background-color: cadetblue;
}
.values .val-box h3 {
font: 18px;
font-weight: 600px;
}
.values .val-box span {
font: 15px;
color: #444a53;
}
#interface .fbuttons {
margin-left: 25px;
}
and here is the html code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://kit.fontawesome.com/f8bc328439.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<section id="menu">
<div class="logo">
<img src="profile-pic.png" alt="" class="">
<h2>Farmer</h2>
</div>
<div class="items">
<li><i class="fas fa-home"></i>Home</li>
<li><i class="fas fa-user"></i>Add/Modify Farmer</li>
<li><i class="fas fa-chart-bar"></i>Check Details</li>
<li><i class="fas fa-tasks"></i>Store</li>
<li><i class="fas fa-infinity"></i>Buyback</li>
<li><i class="fas fa-sign-out-alt"></i>Logout</li>
</div>
</section>
<section id="interface">
<div class="navigation">
<div class="n1">
<div class="search">
<i class="fas fa-search"></i>
<input type="text" placeholder="search">
</div>
</div>
<div class="profile">
<i class="fas fa-bell"></i>
<img src="profile-pic.png" alt="">
</div>
</div>
<h3 class="i-name">Add/modify farmer</h3>
<div class="fbuttons">
<button class="btn btn-danger">REGISTER A NEW FARMER</button>
<button style="margin-left: 10px" class="btn btn-danger" >MODIFY FARMER DETAILS</button>
</div>
<div class="container"style="margin: 10px 0 500px 10px;">
<form>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="">
</div>
<div class="form-row">
<div class="form-group col-md-5">
<label for="aadhar">Aadhar Number</label>
<input type="number" class="form-control" id="">
</div>
<div class="form-group col-md-5">
<label for="mobileno">Mobile number</label>
<input type="number" class="form-control" id="inputPassword4">
</div>
</div>
<div class="form-group">
<label for="inputAddress">Address</label>
<input type="text" class="form-control" id="inputAddress" >
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputVillage">Village</label>
<input type="text" class="form-control" id="inputVillage">
</div>
<div class="form-group col-md-3">
<label for="inputVillage">Taluka</label>
<input type="text" class="form-control" id="inputVillage">
</div>
<div class="form-group col-md-3">
<label for="inputDistrict">District</label>
<select id="inputDistricts" class="form-control">
<option selected>Choose...</option>
<option></option>
</select>
</div>
<div class="form-group col-md-2">
<label for="inputPincode">Pincode</label>
<input type="number" class="form-control" id="inputPincode">
</div>
</div>
<h4> Farm Details </h4>
<div class="form-group">
<label for="inputAddress">Address</label>
<input type="text" class="form-control" id="inputAddress" >
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputVillage">Village</label>
<input type="text" class="form-control" id="inputVillage">
</div>
<div class="form-group col-md-3">
<label for="inputVillage">Taluka</label>
<input type="text" class="form-control" id="inputVillage">
</div>
<div class="form-group col-md-3">
<label for="inputDistrict">District</label>
<select id="inputDistricts" class="form-control">
<option selected>Choose...</option>
<option></option>
</select>
</div>
<div class="form-group col-md-2">
<label for="inputPincode">Pincode</label>
<input type="number" class="form-control" id="inputPincode">
</div>
<div class="form-group col-md-2">
<label for="inputPincode">Survey number</label>
<input type="number" class="form-control" id="inputPincode">
</div>
<div class="form-group col-md-2">
<label for="inputPincode">Area</label>
<input type="number" class="form-control" id="inputPincode" placeholder="In acers">
</div>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="gridCheck">
<label class="form-check-label" for="gridCheck">
Check me out
</label>
</div>
</div>
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
</div>
</section>
</body>
</html>
I believe you're asking the "Sticky Header" question.
https://dev.to/akhilarjun/one-line-sticky-header-using-css-5gp3
It does mean restructuring your form a little bit. The nav section should probably go outside the "interface" section.
An alternate approach is the "holy grail" aproach. Take what they have here: https://css-tricks.com/the-holy-grail-layout-with-css-grid/
and then just use the Aside, Nav, Article sections without the header and footer, and it's essentially what you're asking for.

Bootstrap 4 form fields not aligning horizontally

I am writing a signup form using Bootstrap 4. I can't get the form fields for user image and biography, to align with the rest of the form fields.
I have tweaked the CSS several ways, but can't get the visual effect I want, which is:
Biography and photo upload fields be same width as all form fields, and align horizontally
Photo field split into two equal width sections (a bit like first and last name fields), with uploaded image horizontally aligned in one field, and the button horizontally aligned in a second field.
Here is my code:
body {
color: #fff;
background: #63738a;
font-family: 'Roboto', sans-serif;
}
.form-control {
height: 40px;
box-shadow: none;
color: #969fa4;
}
.form-control:focus {
border-color: #5cb85c;
}
.form-control,
.btn {
border-radius: 3px;
}
.signup-form {
width: 450px;
margin: 0 auto;
padding: 30px 0;
font-size: 15px;
}
.signup-form h2 {
color: #636363;
margin: 0 0 15px;
position: relative;
text-align: center;
}
.signup-form h2:before,
.signup-form h2:after {
content: "";
height: 2px;
width: 30%;
background: #d4d4d4;
position: absolute;
top: 50%;
z-index: 2;
}
.signup-form h2:before {
left: 0;
}
.signup-form h2:after {
right: 0;
}
.signup-form .hint-text {
color: #999;
margin-bottom: 30px;
text-align: center;
}
.signup-form form {
color: #999;
border-radius: 3px;
margin-bottom: 15px;
background: #f2f3f7;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
padding: 30px;
}
.signup-form .form-group {
margin-bottom: 20px;
}
.signup-form input[type="checkbox"] {
margin-top: 3px;
}
.signup-form .btn {
font-size: 16px;
font-weight: bold;
min-width: 140px;
outline: none !important;
}
.signup-form .row div:first-child {
padding-right: 10px;
}
.signup-form .row div:last-child {
padding-left: 10px;
}
.signup-form a {
color: #fff;
text-decoration: underline;
}
.signup-form a:hover {
text-decoration: none;
}
.signup-form form a {
color: #5cb85c;
text-decoration: none;
}
.signup-form form a:hover {
text-decoration: underline;
}
.img-profile {
width: 120px;
height: 120px;
margin-bottom: 15px
}
.avatar .figure img {
float: right;
width: 64px
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700">
<title>Bootstrap Simple Registration Form</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="signup-form">
<form action="#" method="post">
<h2>Create Account</h2>
<div class="form-group">
<div class="row">
<div class="col"><input type="text" class="form-control" name="first_name" placeholder="First Name" required="required"></div>
<div class="col"><input type="text" class="form-control" name="last_name" placeholder="Last Name" required="required"></div>
</div>
</div>
<div class="form-group">
<input type="text" class="form-control" name="screenname" placeholder="Username" required="required">
</div>
<div class="form-group avatar">
<div class="row">
<figure class="figure col-md-2 col-sm-3 col-xs-12">
<img class="img-rounded img-responsive" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="">
</figure>
<div class="form-inline col-md-10 col-sm-9 col-xs-12">
<input type="file" class="file-uploader pull-left">
<button type="submit" class="btn btn-sm btn-default-alt pull-left">Update Image</button>
</div>
</div>
</div>
<div class="form-group">
<label for="user-bio" class="col-lg-2 control-label">Biography</label>
<div class="col-lg-10">
<textarea name="user-bio" id="user-bio" class="form-control" cols="20" rows="3" placeholder="Brief biography"></textarea>
</div>
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" placeholder="Password" required="required">
</div>
<div class="form-group">
<input type="password" class="form-control" name="confirm_password" placeholder="Confirm Password" required="required">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg btn-block">Create Account Now</button>
</div>
</form>
</div>
</body>
</html>
How do I fix the alignment issue in the form?
Step 1 is usually to strip out all the custom margins and padding you've applied. They're usually not necessary with Bootstrap, and they tend to cause problems.
Then wrap the entire thing with a container and set a max-width on it:
body {
color: #fff;
background: #63738a;
font-family: 'Roboto', sans-serif;
}
.form-control {
height: 40px;
box-shadow: none;
color: #969fa4;
}
.form-control:focus {
border-color: #5cb85c;
}
.form-control,
.btn {
border-radius: 3px;
}
.signup-form {
font-size: 15px;
max-width: 450px;
}
.signup-form h2 {
color: #636363;
position: relative;
text-align: center;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css"/>
<div class="container signup-form">
<form action="#" method="post">
<h2>Create Account</h2>
<div class="form-group">
<div class="row">
<div class="col"><input type="text" class="form-control" name="first_name" placeholder="First Name" required="required"></div>
<div class="col"><input type="text" class="form-control" name="last_name" placeholder="Last Name" required="required"></div>
</div>
</div>
<div class="form-group">
<input type="text" class="form-control" name="screenname" placeholder="Username" required="required">
</div>
<div class="form-group avatar">
<div class="row">
<figure class="figure col col-md-2 col-sm-3">
<img class="img-rounded img-responsive" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="">
</figure>
<div class="form-inline col-md-10 col-sm-9 col-xs-12">
<input type="file" class="file-uploader pull-left">
<button type="submit" class="btn btn-sm btn-default-alt pull-left">Update Image</button>
</div>
</div>
</div>
<div class="form-group">
<label for="user-bio" class="control-label">Biography</label>
<textarea name="user-bio" id="user-bio" class="form-control" cols="20" rows="3" placeholder="Brief biography"></textarea>
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" placeholder="Password" required="required">
</div>
<div class="form-group">
<input type="password" class="form-control" name="confirm_password" placeholder="Confirm Password" required="required">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg btn-block">Create Account Now</button>
</div>
</form>
</div>
change the width and remove the float
body {
color: #fff;
background: #63738a;
font-family: 'Roboto', sans-serif;
}
.form-control {
height: 40px;
box-shadow: none;
color: #969fa4;
}
.form-control:focus {
border-color: #5cb85c;
}
.form-control,
.btn {
border-radius: 3px;
}
.signup-form {
width: 450px;
margin: 0 auto;
padding: 30px 0;
font-size: 15px;
}
.signup-form h2 {
color: #636363;
margin: 0 0 15px;
position: relative;
text-align: center;
}
.signup-form h2:before,
.signup-form h2:after {
content: "";
height: 2px;
width: 30%;
background: #d4d4d4;
position: absolute;
top: 50%;
z-index: 2;
}
.signup-form h2:before {
left: 0;
}
.signup-form h2:after {
right: 0;
}
.signup-form .hint-text {
color: #999;
margin-bottom: 30px;
text-align: center;
}
.signup-form form {
color: #999;
border-radius: 3px;
margin-bottom: 15px;
background: #f2f3f7;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
padding: 30px;
}
.signup-form .form-group {
margin-bottom: 20px;
}
.signup-form input[type="checkbox"] {
margin-top: 3px;
}
.signup-form .btn {
font-size: 16px;
font-weight: bold;
min-width: 140px;
outline: none !important;
}
.signup-form .row div:first-child {
padding-right: 10px;
}
.signup-form .row div:last-child {
padding-left: 10px;
}
.signup-form a {
color: #fff;
text-decoration: underline;
}
.signup-form a:hover {
text-decoration: none;
}
.signup-form form a {
color: #5cb85c;
text-decoration: none;
}
.signup-form form a:hover {
text-decoration: underline;
}
.img-profile {
width: 120px;
height: 120px;
margin-bottom: 15px
}
/* code */
/* for image */
.avatar .figure img {
width: 64px;
}
/* for choose file input */
.pull-left {
float: left;
width: 138px;
margin-left: -26px;
}
/* for biography */
textarea.form-control {
/* height: auto; */
margin-left: -15px;
width: 390px;
}
/* upload button */
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
margin-left: 38px;
padding-left: 22px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,700">
<title>Bootstrap Simple Registration Form</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="signup-form">
<form action="#" method="post">
<h2>Create Account</h2>
<div class="form-group">
<div class="row">
<div class="col"><input type="text" class="form-control" name="first_name" placeholder="First Name" required="required"></div>
<div class="col"><input type="text" class="form-control" name="last_name" placeholder="Last Name" required="required"></div>
</div>
</div>
<div class="form-group">
<input type="text" class="form-control" name="screenname" placeholder="Username" required="required">
</div>
<div class="form-group avatar">
<div class="row">
<figure class="figure col-md-2 col-sm-3 col-xs-12">
<img class="img-rounded img-responsive" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="">
</figure>
<div class="form-inline col-md-10 col-sm-9 col-xs-12">
<input type="file" class="file-uploader pull-left">
<button type="submit" class="btn btn-sm btn-default-alt pull-left">Update Image</button>
</div>
</div>
</div>
<div class="form-group">
<label for="user-bio" class="col-lg-2 control-label">Biography</label>
<div class="col-lg-10">
<textarea name="user-bio" id="user-bio" class="form-control" cols="20" rows="3" placeholder="Brief biography"></textarea>
</div>
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" placeholder="Password" required="required">
</div>
<div class="form-group">
<input type="password" class="form-control" name="confirm_password" placeholder="Confirm Password" required="required">
</div>
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg btn-block">Create Account Now</button>
</div>
</form>
</div>
</body>
</html>
see the last few lines and run a snippet to view result

Make 2 Divs same height as screen

Im using bootstrap 3 with flexbox in order to achieve the output. To explain, I am creating a login screen where the left div has a background-image that completely covers the div and on the right side is the form container together with it form contents. I've provided a snippet to show what I am trying to do.
#page-login-template {
margin-top: -32px;
.column-wrapper{
display:flex;
}
.login-left {
background-image: url("assets/images/web_login#2x.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.login-right {
padding: 0 100px;
.login-logo {
padding:99px 0;
}
h4 {
font-family: Poppins;
font-size: 18px;
color: #0392cc;
}
.form-container {
padding: 20px 0;
.form-part-group {
padding: 10px 0;
}
[type=email],
[type=password],[type=text] {
height: 40px;
font-size: 18px;
font-family: Poppins;
color: #333;
}
[type=password],[type=text]{
border-right:0;
}
.input-group-addon {
background-color: white;
border-right: 1px solid #e9e9e9;
border-left:0;
border-top:1px solid #e9e9e9;
border-bottom: 1px solid #e9e9e9;
}
i{
font-size:18px;
}
.btn-login{
height:54px;
font-size:16px;
font-family:Poppins;
color:#fff;
background:#0570B6;
box-shadow: 0px 3px 6px #00000029;
}
.btn-login:hover{
background:#0570B6;
}
}
.form-container-2{
padding:20px 0;
p{
font-family: Poppins;
font-size: 12px;
color:#333;
font-weight:bold;
}
a{
color:#0392CC
}
}
.form-container-3{
padding-top:180px;
p{
font-family: Poppins;
font-size: 11px;
color:#333;
font-weight:bold;
}
a{
color:#0392CC
}
}
}
}
<div id="page-login-template" class="container-fluid">
<div class="row column-wrapper">
<div class="col-lg-7 login-left"></div>
<div class="col-lg-5 login-right">
<div class="row login-logo text-center">
<img src='<?= get_stylesheet_directory_uri() . '/assets/images/logo/logo#2x.png' ?>' width="50%">
</div>
<h4 class="text-center">Login to My Account</h4>
<div class="row form-container">
<form class="form-horizontal">
<div class="row">
<div class="form-part-group col-lg-12">
<input id="email" type="email" class="form-control form-input-group email-input" data-error-required="This field is required" data-class-focus="email-input" placeholder="Email">
<div id="email" class="error-block"></div>
</div>
</div>
<div class="row form-part-group">
<div class="input-group col-lg-12 password-input">
<input id="password" type="password" class="form-control form-input-group" data-error-required="This field is required" data-class-focus="password-input" placeholder="Password">
<div class="input-group-addon">
<i class="fa fa-eye-slash password-eye hide-password "></i>
</div>
</div>
<div id="password" class="error-block"></div>
</div>
<div class="row">
<div class="form-part-group col-lg-12">
<button type="button" class="btn btn-block btn-login" disabled>Log In</button>
</div>
</div>
</form>
<div class="row form-container-2 text-center">
<p>Don't have an account yet? Create An Account Now</p>
</div>
<div class="row form-container-3 text-center">
<p>Copyright © 2020. All Rights Reserved.</p>
<p>Terms & Conditions and Data Privacy Policy
</div>
</div>
</div>
</div>
</div>
As you can see I am controlling the height of the layout via padding the contents on the form. Is there a way to have the same output without it being dependent on the form's height.
height: 100vh;
This code can make your div same height as screen
First thing that you need to do is to set on "column-wrapper" class:
height: 100vh;
You probably need something like this, just group the div's in a way that you like:
JSFiddle
Try this. You need to set elements to height 100% or 100vh. And the right part is better to make with the flexbox.
html,
body {
height: 100%;
}
#page-login-template{
height: 100%;
}
.column-wrapper {
display: flex;
height: 100%;
}
.login-left {
background-image: url("https://source.unsplash.com/user/erondu/1600x900");
background-repeat: no-repeat;
background-size: cover;
height: 100%;
}
.login-logo{
padding-top:100px;
}
.login-right {
height: 100%;
overflow-y: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}
h4 {
font-family: Poppins;
font-size: 18px;
color: #0392cc;
}
.form-container {
padding: 20px 0;
}
.form-part-group {
padding: 10px 0;
}
[type=email],
[type=password],
[type=text] {
height: 40px;
font-size: 18px;
font-family: Poppins;
color: #333;
}
[type=password],
[type=text] {
border-right: 0;
}
.input-group-addon {
background-color: white;
border-right: 1px solid #e9e9e9;
border-left: 0;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e9e9e9;
}
.input-group-addon i {
font-size: 18px;
}
.btn-login {
height: 54px;
font-size: 16px;
font-family: Poppins;
color: #fff;
background: #0570B6;
box-shadow: 0px 3px 6px #00000029;
}
.btn-login:hover {
background: #0570B6;
}
.form-container-2 {
padding: 20px 0;
}
.form-container-2 p {
font-family: Poppins;
font-size: 12px;
color: #333;
font-weight: bold;
}
.form-container-2 a {
color: #0392CC
}
.form-container-3 p {
font-family: Poppins;
font-size: 11px;
color: #333;
font-weight: bold;
}
.form-container-3 a {
color: #0392CC
}
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<div id="page-login-template" class="container-fluid">
<div class="row column-wrapper">
<div class="col-md-7 login-left"></div>
<div class="col-md-5 login-right">
<div class="row login-logo text-center">
<img src='https://source.unsplash.com/random/200x200>' height="150">
</div>
<div class="form-container">
<h4 class="text-center">Login to My Account</h4>
<form>
<div class="form-group">
<input id="email" type="email" class="form-control form-input-group email-input"
data-error-required="This field is required" data-class-focus="email-input"
placeholder="Email">
<div id="email" class="error-block"></div>
</div>
<div class="form-group">
<input id="password" type="password" class="form-control form-input-group"
data-error-required="This field is required" data-class-focus="password-input"
placeholder="Password">
<div class="input-group-addon">
<i class="fa fa-eye-slash password-eye hide-password "></i>
</div>
<div id="password" class="error-block"></div>
</div>
<div class="form-group">
<button type="button" class="btn btn-block btn-login" disabled>Log In</button>
</div>
</form>
</div>
<div>
<div class="row form-container-2 text-center">
<p>Don't have an account yet? Create An Account Now</p>
</div>
<div class="row form-container-3 text-center">
<p>Copyright © 2020. All Rights Reserved.</p>
<p>Terms & Conditions and Data Privacy Policy
</div>
</div>
</div>
</div>
</div>

Bootstrap/CSS: make my content bellow the header on scroll

I have this simple html page, with css it is working good except when I scroll the page down, the input form is above the header. I would like the header to always be above the content When I scroll.
Can anyone help ?
.sticky {
position: sticky;
top: 0;
}
#i ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: blue;
}
#i li {
float: left;
}
#i li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
#i li a:hover {
border-radius: 0px 0px 10px 10px;
background-color: rgb(43, 137, 226);
}
.active {
background-color: rgb(43, 137, 226);
}
#footer-id {
background-color: blue;
}
#MyForm .contact-form {
background: #fff;
margin-top: 10%;
margin-bottom: 5%;
width: 70%;
}
#MyForm .fixed-header {
width: 100%;
margin: 0 auto;
position: fixed;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
z-index: 999;
}
#MyForm .contact-form .form-control {
border-radius: 1rem;
}
#MyForm .contact-image {
text-align: center;
}
#MyForm .contact-image img {
border-radius: 6rem;
width: 11%;
margin-top: -3%;
transform: rotate(29deg);
}
#MyForm .contact-form form {
padding: 14%;
}
#MyForm .contact-form form .row {
margin-bottom: -7%;
}
#MyForm .contact-form h3 {
margin-bottom: 8%;
/* margin-top: -10%; */
text-align: center;
color: #0062cc;
}
#MyForm .contact-form .btnContact {
width: 50%;
border: none;
border-radius: 1rem;
padding: 1.5%;
background: #dc3545;
font-weight: 600;
color: #fff;
cursor: pointer;
}
#MyForm .btnContactSubmit {
width: 50%;
border-radius: 1rem;
padding: 1.5%;
color: #fff;
background-color: #0062cc;
border: none;
cursor: pointer;
}
.input-group {
position: relative;
width: 100%;
}
.input-group input {
position: relative;
height: 45px;
border-radius: 30px;
min-width: 500px;
box-shadow: none;
/* border: 1px solid #eaeaea; */
padding-left: 100px;
}
.input-group label {
position: absolute;
left: 0;
height: 48px;
background: #55ccf2;
padding: 0px 25px;
border-radius: 30px;
line-height: 48px;
font-size: 18px;
color: #fff;
top: 0;
width: 100px;
font-weight: 100;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<!--The content below is only a placeholder and can be replaced.-->
<span id="i">
<ul class="sticky">
<li>
<a
href="#"
>Home</a
>
</li>
<li>
<a
href="#news"
>News</a
>
</li>
<li>
<a
href="#contact"
>Contact</a
>
</li>
<li>
<a
href="#about"
>About</a
>
</li>
<li>
<a
href="#test"
>Test</a
>
</li>
<ul class="nav navbar-nav pull-right">
<li class="nav">Contact</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li class="nav">
Target
</li>
</ul>
</ul>
</span>
<div #con class="fixed-header">
<br />
<br />
<!-- <div class="input-group">
<input type="text">
<label>Some Text</label>
</div> -->
<div id="MyForm">
<div class="container contact-form">
<div class="contact-image">
<img src="assets/rocket_contact.png" alt="rocket_contact" />
</div>
<form
[formGroup]="productForm"
(ngSubmit)="sendMail(productForm.value)"
>
<h3>Merci de nous laisser un message</h3>
<!-- <div class="row"> -->
<div class="col-md-12">
<div class="form-group" id="your_name">
<input
formControlName="name"
type="text"
name="txtName"
class="form-control"
placeholder="Your Name *"
value=""
/>
</div>
<div class="form-group">
<input
formControlName="email"
type="text"
name="txtEmail"
class="form-control"
placeholder="Your Email *"
value=""
/>
</div>
<div class="form-group">
<input
formControlName="number"
type="text"
name="txtPhone"
class="form-control"
placeholder="Your Phone Number *"
value=""
/>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea
formControlName="message"
name="txtMsg"
class="form-control"
placeholder="Your Message *"
style="width: 100%; height: 150px;"
></textarea>
</div>
<div class="form-group">
<input
type="submit"
name="btnSubmit"
class="btnContact"
value="Send Message"
/>
</div>
</div>
<!-- </div> -->
</form>
</div>
</div>
</div>
</body>
</html>
When an element has position: absolute or position: fixed, it happens that it can overlap with other elements. When it happens, the container that will be rendered above will be the one that has the higher z-index value. If the z-index isn't set, then it's the lowest possible.
For this reason, you can just add:
z-index: 1;
to your sticky class:
.sticky {
position: sticky;
top: 0;
z-index: 1;
}
#i ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: blue;
}
#i li {
float: left;
}
#i li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
#i li a:hover {
border-radius: 0px 0px 10px 10px;
background-color: rgb(43, 137, 226);
}
.active {
background-color: rgb(43, 137, 226);
}
#footer-id {
background-color: blue;
}
#MyForm .contact-form {
background: #fff;
margin-top: 10%;
margin-bottom: 5%;
width: 70%;
}
#MyForm .fixed-header {
width: 100%;
margin: 0 auto;
position: fixed;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
z-index: 999;
}
#MyForm .contact-form .form-control {
border-radius: 1rem;
}
#MyForm .contact-image {
text-align: center;
}
#MyForm .contact-image img {
border-radius: 6rem;
width: 11%;
margin-top: -3%;
transform: rotate(29deg);
}
#MyForm .contact-form form {
padding: 14%;
}
#MyForm .contact-form form .row {
margin-bottom: -7%;
}
#MyForm .contact-form h3 {
margin-bottom: 8%;
/* margin-top: -10%; */
text-align: center;
color: #0062cc;
}
#MyForm .contact-form .btnContact {
width: 50%;
border: none;
border-radius: 1rem;
padding: 1.5%;
background: #dc3545;
font-weight: 600;
color: #fff;
cursor: pointer;
}
#MyForm .btnContactSubmit {
width: 50%;
border-radius: 1rem;
padding: 1.5%;
color: #fff;
background-color: #0062cc;
border: none;
cursor: pointer;
}
.input-group {
position: relative;
width: 100%;
}
.input-group input {
position: relative;
height: 45px;
border-radius: 30px;
min-width: 500px;
box-shadow: none;
/* border: 1px solid #eaeaea; */
padding-left: 100px;
}
.input-group label {
position: absolute;
left: 0;
height: 48px;
background: #55ccf2;
padding: 0px 25px;
border-radius: 30px;
line-height: 48px;
font-size: 18px;
color: #fff;
top: 0;
width: 100px;
font-weight: 100;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<!--The content below is only a placeholder and can be replaced.-->
<span id="i">
<ul class="sticky">
<li>
<a
href="#"
>Home</a
>
</li>
<li>
<a
href="#news"
>News</a
>
</li>
<li>
<a
href="#contact"
>Contact</a
>
</li>
<li>
<a
href="#about"
>About</a
>
</li>
<li>
<a
href="#test"
>Test</a
>
</li>
<ul class="nav navbar-nav pull-right">
<li class="nav">Contact</li>
</ul>
<ul class="nav navbar-nav pull-right">
<li class="nav">
Target
</li>
</ul>
</ul>
</span>
<div #con class="fixed-header">
<br />
<br />
<!-- <div class="input-group">
<input type="text">
<label>Some Text</label>
</div> -->
<div id="MyForm">
<div class="container contact-form">
<div class="contact-image">
<img src="assets/rocket_contact.png" alt="rocket_contact" />
</div>
<form
[formGroup]="productForm"
(ngSubmit)="sendMail(productForm.value)"
>
<h3>Merci de nous laisser un message</h3>
<!-- <div class="row"> -->
<div class="col-md-12">
<div class="form-group" id="your_name">
<input
formControlName="name"
type="text"
name="txtName"
class="form-control"
placeholder="Your Name *"
value=""
/>
</div>
<div class="form-group">
<input
formControlName="email"
type="text"
name="txtEmail"
class="form-control"
placeholder="Your Email *"
value=""
/>
</div>
<div class="form-group">
<input
formControlName="number"
type="text"
name="txtPhone"
class="form-control"
placeholder="Your Phone Number *"
value=""
/>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea
formControlName="message"
name="txtMsg"
class="form-control"
placeholder="Your Message *"
style="width: 100%; height: 150px;"
></textarea>
</div>
<div class="form-group">
<input
type="submit"
name="btnSubmit"
class="btnContact"
value="Send Message"
/>
</div>
</div>
<!-- </div> -->
</form>
</div>
</div>
</div>
</body>
</html>

Bootstrap custom layout right column wrapping under left column

Can someone please help me out with my bootstrap layout.
Before the browser breakpoint hits 980px the right column wraps underneath the left column, but I want it to stay in its position though with no wrapping happening.
The thing is I also require the left column to have a fixed width and the right column to not have a fixed width but possibly be able to decrease the widths of the elements in my form so they dont overlap each other when the browser/viewport is resized (My horizontal form has more elements within the same lines, but I omitted some of these overlapping elements to remain minimal for the the sake of this question).
I dont think my form-group elements have the correct col sizes...
I wish to use media queries to get around this (mine currently are working a little), so if anyone can play in my codepen that would be very helpful :)
I have a link you can modify my layout here:
http://codepen.io/krystyna93/pen/GZzqrq
body {
background-color: #ccc;
}
/* General styles */
.container {
background-color: #bbb;
font-family: arial, verdana, sans-serif;
width: 1530px;
margin: 0 auto;
}
/* Large desktop */
#media and screen (max-width: 1590px) {
.container {
width: auto;
}
}
#media and screen (min-width: 981px) and (max-width: 1530px) {
.accordion.sidebar {
width: 230px;
}
}
#media (min-width: 980px) {
.accordion.sidebar {
min-width: 200px;
max-width: 200px;
}
}
.col-md-10 {
border-left: 1px solid #4d4d4d;
padding: 0;
margin: 0;
}
.container .row.header {
color: #fff;
border-bottom: 6px solid #fff
}
.container .row.header h1 {
padding: 30px 0;
font-size: 3.5em;
font-weight: 300;
}
h2 {
color: #fff;
font-size: 32px;
}
h3 {
color: #ccc;
font-size: 30px;
padding-bottom: 10px;
}
h3.inner {
padding-left: 15px;
}
h4 {
color: #ccc;
font-size: 22px;
}
.headers {
border-top: 1px solid #ccc;
margin-top: 50px;
margin-bottom: 30px;
}
.headers h1 {
padding: 20px 0 0 0;
}
.headers p {
font-size: 1.6em;
color: #fff;
padding: 0 0 10px 0;
margin: 0;
}
/* ****** NAVIGATION SIDEBAR ********
**********************************
*/
.accordion.sidebar {
padding: 0;
background-color: #fff;
}
.panel {
border-radius: 0 !important;
border: 0;
font-family: 'Lato', Arial, sans-serif;
font-weight: 400
}
.panel-group {
border-radius: 0; //box-shadow: 1px 1px 3px #074f68; border: 0; background-color: #fff}
.panel-heading h4.panel-title {
border-radius: 0; //box-shadow: 1px 1px 3px #074f68; border: 0; background-color: #fff;}
.panel-heading h4.panel-title a: link {
margin-left: 10px;
text-decoration: none;
font-weight: bold;
font-size: 20px
}
.panel-heading h4.panel-title a:active {
color: #fff
}
.panel-heading h4.panel-title a:hover {
color: #FF5500
}
.panel-group .panel+.panel {
margin-top: 0px !important;
border-top: 1px solid #ccc
}
.panel.panel-default.custom .panel-heading {
background: #fff;
color: #000;
border-color: #fff
}
.panel-body {
/* padding-top: 2px !important; padding-bottom: 0px !important; */
padding: 0px !important;
border: 0
}
.panel-body ul {
margin: 0;
padding: 0
}
.panel-body ul li {
padding: 10px 0 !important;
border-bottom: 1px solid #ccc;
font-size: 1.4em
}
.panel-body ul li:last-child {
border-bottom: 0
}
.panel-body ul a {
color: #1f1f1f
}
.panel-body ul li a:link {
margin-left: 40px !important;
color: #1f1f1f
}
.panel-body ul li a:active {
color: #fff
}
.panel-body ul li a:hover {
text-decoration: none;
color: #FF5500
}
#collapseOne.panel-collapse,
#collapseTwo.panel-collapse,
#collapseThree.panel-collapse {
border: 0 !important;
padding: 0
}
.panel-heading.collapsed {
background-color: #222222
}
/* ******** FORM STYLING ***********
************************************
*/
.form-horizontal .form-group .custom-label {
text-align: left;
margin-top: -10px;
font-size: 22px;
font-weight: normal;
color: #fff;
}
.form-horizontal .form-group .form-control {
background-color: #4d4d4d;
border-color: #4d4d4d;
color: #fff;
border-radius: 3px;
}
.form-horizontal .form-group .input-text {
font-size: 1.3em;
color: #fff;
}
.form-horizontal .form-group .form-control:hover {
background-color: #34383C;
border: 1px solid #4d4d4d;
}
.form-horizontal .form-group .form-control:focus {
border: 1px solid #FF5500;
}
/* DROPDOWN MENU STYLING */
/* OPTIONAL FOR DROPDOWN CARET */
.dropdown-toggle .caret {
/* position: absolute; right: 12px; top: calc(50% - 2px); */
background-image: url('arr.jpg');
background-repeat: no-repeat;
position: absolute;
right: 12px;
top: calc(50% - 2px);
}
.form-group.social .col-md-2 {
padding: 0;
margin: 0;
width: 200px;
}
.form-group.social .col-md-2 .fa-instagram,
.form-group.social .col-md-2 .fa-twitter {
font-size: 1.1em;
padding: 0 5px 0 20px;
}
.changePswrd {
padding: 3px 0 0 12px;
}
.changePswrd a:link {
font-family: 'Lato', verdana, sans-serif;
font-size: 1.3em;
color: #fff;
display: inline-block;
}
.changePswrd a:hover {
text-decoration: none;
color: #FF5500;
}
.form-group .placeholder-img.col-md-2 {
height: 320px;
width: 230px;
background-color: #4d4d4d;
margin: 0 20px;
}
.form-group .placeholder-img-thumb {
height: 320px;
}
.form-group .placeholder-img-thumb .thumb-img {
text-align: center;
width: 130px;
}
.form-group .placeholder-img-thumb .circle {
width: 130px;
height: 130px;
background: #4d4d4d;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
border-radius: 100px;
}
.form-group .placeholder-img-thumb .caption {
width: 100%;
color: #fff;
}
.form-group .profile-photo-help.col-md-4 {
width: 200px;
}
.form-group .profile-photo-help {
width: 280px;
color: #fff;
}
.form-group .profile-photo-help p {} .form-group .profile-photo-help a:link {
color: #FF5500;
text-decoration: none;
}
.form-group .profile-photo-help a:hover {
color: #fff;
}
.form-group .create-card-btn .glyphicon-plus {
font-size: 0.9em;
padding: 0 10px 0 0;
}
.form-group .input-group.date span.input-group-addon {
background-color: #4d4d4d;
color: #fff;
border: none;
border-radius: 3px;
border-color: none;
}
.form-group .input-group.date .form-control.date {
font-size: 1.2em;
}
.form-group .strength-delete-btn .glyphicon-minus {
font-size: 0.9em;
padding: 0 5px 0 0;
}
/* SUBMISSION BUTTONS */
.submission {
background-color: #333333;
border-top: 1px solid #4d4d4d;
margin-top: 80px;
padding-top: 40px;
padding-bottom: 40px;
}
.submission button {
border-radius: 3px;
font-size: 1.5em;
border: none;
}
.submission .glyphicon-remove-circle,
.submission .glyphicon-ok-circle {
font-size: 1.6em;
font-weight: 400;
vertical-align: middle;
padding: 0 5px;
color: #fff;
}
.submission .btn-cancel {
margin-right: 20px;
background-color: #4d4d4d;
}
.submission .btn-save {
background-color: #aaa;
}
.submission .action-btns .btn-primary:hover,
.submission .action-btns .btn-primary.outline:focus,
.btn-primary:active {
color: #33a6cc;
border-color: #fff;
}
.submission .action-btns .btn-primary:active,
.submission .action-btns .btn-primary.active {
border-color: #007299;
color: #007299;
box-shadow: none;
}
.btn.outline {
background: none;
padding: 12px 22px;
}
.btn.outline.upload {
position: absolute;
bottom: 0;
padding: 5px 40px 5px 40px;
}
.btn.outline.football {
background: none;
padding: 5px 22px;
margin-right: 20px;
}
.btn.outline.create-card-btn {
background: none;
padding: 5px 22px;
}
.btn.outline.sizing-guide-btn {
background: none;
padding: 5px 22px;
}
.btn.outline.strength-delete-btn {
background: none;
padding: 5px 22px;
width: 100%
}
.btn.outline.add-result-btn {
background: none;
padding: 5px 22px;
margin-top: 15px;
}
.btn-primary.outline {
border: 1px solid #fff;
color: #fff;
font-family: 'Lato', verdana, sans-serif;
font-size: 1.1em;
}
.btn-primary.outline.strength-delete-btn {
border: 1px solid #4d4d4d;
color: #4d4d4d;
}
.btn-primary.outline:hover,
.btn-primary.outline:focus,
.btn-primary.outline:active,
.btn-primary.outline.active,
.open > .dropdown-toggle.btn-primary {
color: #FF5500;
border-color: #F47929;
}
.btn-primary.outline:active,
.btn-primary.outline.active {
border-color: #007299;
color: #007299;
box-shadow: none;
}
/* CUSTOM SUBMISSION BTN VALUES */
.btn-primary {
padding: 14px 24px;
border: 0 none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus {
outline: 0 none;
}
<head>
<title>layout</title>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="index,follow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.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" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="row header">
<div class="col-md-12">
<h1>Heading 1</h1>
</div>
</div>
<div class="row">
<div class="col-md-2 accordion sidebar">
<div class="panel-group" id="accordion">
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="account2.html" href="#collapseOne"> Link 1 </a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseTwo">Title 2</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseThree">Title 3</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseFive">Title 4</a>
</h4>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseSix">Title 5
</a>
</h4>
</div>
</div>
</div>
<!-- end of sidebar -->
</div>
<!-- end of row -->
<div class="container load">
<div class="col-lg-10">
<div class="wrapper">
<div class="row">
<div class="col-md-10">
<h2>Page Title</h2>
<div class="form-horizontal" role="form" action="/details" method="post">
<div class="form-group">
<h3 class="inner">General</h3>
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="" placeholder="title" focus>
</div>
</div>
<div class="form-group">
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="title">
</div>
</div>
<div class="headers">
<h3>Information</h3>
<p>
Info titletitletitletitletitletitletitletitletitle</br>
titletitletitletitletitletitletitletitletitletitletitletitletitletitletitle
</p>
</div>
<div class="form-group">
<h3 class="inner">Address</h3>
<label for="unit" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="1">
</div>
</div>
<div class="form-group">
<label for="streetNo" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="25">
</div>
</div>
<div class="form-group">
<label for="streetName" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="streetName" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="suburb" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="suburb" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="zip" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="zip" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="state" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="state" placeholder="title">
</div>
</div>
<div class="headers">
<h3>Social Networks</h3>
</div>
<div class="form-group social">
<div class="col-md-2 col-sm-2">
<label for="instagram" class="control-label custom-label"><span><i class="fa fa-instagram"></i></span> Instagram</label>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" class="form-control input-text" id="instagram-input" placeholder="instagramhandle">
</div>
</div>
<div class="form-group social">
<div class="col-md-2 col-sm-2">
<label for="twitter" class="control-label custom-label"><span><i class="fa fa-twitter"></i></span> Twitter</label>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" class="form-control input-text" id="twitter-input" placeholder="twitterhandle">
</div>
</div>
<div class="row submission">
<div class="form-group btn-block">
<div class="pull-right">
<button type="button" class="btn btn-default btn-lg btn-cancel ">Cancel changes</button>
<button type="button" class="btn btn-default btn-lg btn-save">Save changes</button>
</div>
</div>
</div>
</div>
<!-- end of form -->
</div>
</div>
<!-- end of row -->
<!-- </div> end of container -->
</div>
</div>
</div>
<!-- end of container -->
body {
background-color: #ccc;
}
/* General styles */
.container { background-color: #bbb; font-family: arial, verdana, sans-serif; width: 1530px; margin: 0 auto; }
/* Large desktop */
#media and screen (max-width: 1590px) {
.container {width: auto;}
}
#media and screen (min-width: 981px) and (max-width: 1530px){
.accordion.sidebar {width: 230px;
}
}
#media and screen(max-width: 980px) {
}
.col-md-10{ border-left: 1px solid #4d4d4d; padding: 0; margin: 0;}
.container .row.header{ color: #fff; border-bottom: 6px solid #fff }
.container .row.header h1 { padding: 30px 0; font-size: 3.5em; font-weight: 300; }
h2 { color: #fff; font-size: 32px; }
h3 {color: #ccc; font-size: 30px; padding-bottom: 10px; }
h3.inner { padding-left: 15px;}
h4 {color: #ccc; font-size: 22px; }
.headers { border-top: 1px solid #ccc; margin-top: 50px; margin-bottom:30px;}
.headers h1 { padding: 20px 0 0 0; }
.headers p {font-size: 1.6em; color: #fff; padding: 0 0 10px 0; margin: 0;}
/* ****** NAVIGATION SIDEBAR ********
**********************************
*/
.accordion.sidebar { padding: 0; background-color: #fff;}
.panel {border-radius: 0 !important; border: 0; font-family: 'Lato', Arial, sans-serif; font-weight: 400}
.panel-group {border-radius: 0; //box-shadow: 1px 1px 3px #074f68; border: 0; background-color: #fff}
.panel-heading h4.panel-title {border-radius: 0; //box-shadow: 1px 1px 3px #074f68; border: 0; background-color: #fff;}
.panel-heading h4.panel-title a:link { margin-left: 10px; text-decoration: none; font-weight: bold; font-size: 20px}
.panel-heading h4.panel-title a:active {color: #fff }
.panel-heading h4.panel-title a:hover {color: #FF5500}
.panel-group .panel+.panel {margin-top: 0px !important; border-top: 1px solid #ccc}
.panel.panel-default.custom .panel-heading { background: #fff; color: #000; border-color: #fff }
.panel-body {/* padding-top: 2px !important; padding-bottom: 0px !important; */ padding: 0px !important; border: 0 }
.panel-body ul { margin: 0; padding: 0 }
.panel-body ul li { padding: 10px 0 !important; border-bottom: 1px solid #ccc; font-size: 1.4em}
.panel-body ul li:last-child {border-bottom: 0}
.panel-body ul a { color: #1f1f1f}
.panel-body ul li a:link { margin-left: 40px !important; color: #1f1f1f}
.panel-body ul li a:active {color: #fff}
.panel-body ul li a:hover {text-decoration: none; color: #FF5500 }
#collapseOne.panel-collapse,
#collapseTwo.panel-collapse,
#collapseThree.panel-collapse { border: 0 !important; padding: 0}
.panel-heading.collapsed { background-color: #222222}
/* ******** FORM STYLING ***********
************************************
*/
.form-horizontal .form-group .custom-label{ text-align: left; margin-top: -10px; font-size: 22px; font-weight: normal; color: #fff; }
.form-horizontal .form-group .form-control { background-color: #4d4d4d; border-color: #4d4d4d; color: #fff; border-radius: 3px;}
.form-horizontal .form-group .input-text { font-size: 1.3em; color: #fff;}
.form-horizontal .form-group .form-control:hover { background-color: #34383C; border: 1px solid #4d4d4d;}
.form-horizontal .form-group .form-control:focus { border: 1px solid #FF5500; }
/* DROPDOWN MENU STYLING */
/* OPTIONAL FOR DROPDOWN CARET */
.dropdown-toggle .caret { /* position: absolute; right: 12px; top: calc(50% - 2px); */ background-image: url('arr.jpg'); background-repeat: no-repeat; position: absolute; right: 12px; top: calc(50% - 2px);}
.form-group.social .col-md-2 { padding: 0; margin: 0; width: 200px;}
.form-group.social .col-md-2 .fa-instagram, .form-group.social .col-md-2 .fa-twitter { font-size: 1.1em; padding: 0 5px 0 20px;}
.changePswrd {padding: 3px 0 0 12px;}
.changePswrd a:link{ font-family: 'Lato', verdana, sans-serif; font-size: 1.3em; color: #fff; display: inline-block; }
.changePswrd a:hover{ text-decoration: none; color: #FF5500; }
.form-group .placeholder-img.col-md-2{ height: 320px; width: 230px; background-color: #4d4d4d; margin: 0 20px;}
.form-group .placeholder-img-thumb { height: 320px;}
.form-group .placeholder-img-thumb .thumb-img { text-align: center; width: 130px;}
.form-group .placeholder-img-thumb .circle { width: 130px; height: 130px; background: #4d4d4d; -moz-border-radius: 100px; -webkit-border-radius: 100px; border-radius: 100px; }
.form-group .placeholder-img-thumb .caption { width: 100%; color: #fff;}
.form-group .profile-photo-help.col-md-4 { width: 200px;}
.form-group .profile-photo-help { width: 280px; color: #fff;}
.form-group .profile-photo-help p {}
.form-group .profile-photo-help a:link { color: #FF5500; text-decoration: none; }
.form-group .profile-photo-help a:hover { color: #fff; }
.form-group .create-card-btn .glyphicon-plus { font-size: 0.9em; padding: 0 10px 0 0;}
.form-group .input-group.date span.input-group-addon { background-color: #4d4d4d; color: #fff; border: none; border-radius: 3px; border-color: none;}
.form-group .input-group.date .form-control.date { font-size: 1.2em;}
.form-group .strength-delete-btn .glyphicon-minus { font-size: 0.9em; padding: 0 5px 0 0;}
/* SUBMISSION BUTTONS */
.submission { background-color: #333333; border-top: 1px solid #4d4d4d; margin-top: 80px; padding-top: 40px; padding-bottom: 40px;}
.submission button{ border-radius: 3px; font-size: 1.5em; border: none;}
.submission .glyphicon-remove-circle, .submission .glyphicon-ok-circle {font-size: 1.6em; font-weight: 400; vertical-align: middle; padding: 0 5px; color: #fff;}
.submission .btn-cancel {margin-right: 20px; background-color: #4d4d4d;}
.submission .btn-save {background-color: #aaa; }
.submission .action-btns .btn-primary:hover, .submission .action-btns .btn-primary.outline:focus, .btn-primary:active { color: #33a6cc; border-color: #fff; }
.submission .action-btns .btn-primary:active, .submission .action-btns .btn-primary.active { border-color: #007299; color: #007299; box-shadow: none; }
.btn.outline { background: none; padding: 12px 22px; }
.btn.outline.upload { position: absolute; bottom: 0; padding: 5px 40px 5px 40px; }
.btn.outline.football { background: none; padding: 5px 22px; margin-right: 20px;}
.btn.outline.create-card-btn {background: none; padding: 5px 22px; }
.btn.outline.sizing-guide-btn { background: none; padding: 5px 22px; }
.btn.outline.strength-delete-btn { background: none; padding: 5px 22px; width: 100%}
.btn.outline.add-result-btn { background: none; padding: 5px 22px; margin-top: 15px;}
.btn-primary.outline { border: 1px solid #fff; color: #fff; font-family: 'Lato', verdana, sans-serif; font-size: 1.1em;}
.btn-primary.outline.strength-delete-btn { border: 1px solid #4d4d4d; color: #4d4d4d;}
.btn-primary.outline:hover, .btn-primary.outline:focus, .btn-primary.outline:active, .btn-primary.outline.active, .open > .dropdown-toggle.btn-primary { color: #FF5500; border-color: #F47929; }
.btn-primary.outline:active, .btn-primary.outline.active { border-color: #007299; color: #007299; box-shadow: none; }
/* CUSTOM SUBMISSION BTN VALUES */
.btn-primary { padding: 14px 24px; border: 0 none; }
.btn:focus, .btn:active:focus, .btn.active:focus { outline: 0 none; }
<head>
<title>CUSTOM LAYOUT</title>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="index,follow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="custom-styles.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.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" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<!-- **********************************
following functionality for the accordion referencing to load individual
body of parent links
************************************
-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
<!-- script for navigation load of individual body sections -->
<script src="accordion.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.10.0/js/i18n/defaults-*.min.js"></script>
</head>
<body>
<div class="container">
<div class="row header">
<div class="col-md-12">
<h1>Heading 1</h1>
</div>
</div>
<div class="row">
<div class="col-md-2 accordion sidebar">
<div class="panel-group" id="accordion">
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="account2.html" href="#collapseOne">
Link 1
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseTwo">
Title 2
</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseThree">
Title 3
</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-unstyled">
<li> sub-link
<li> sub-link
<li> sub-link
</ul>
</div>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseFive">
Title 4
</a>
</h4>
</div>
</div>
<div class="panel panel-default custom">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" data-htmlref="#" href="#collapseSix">
Title 5
</a>
</h4>
</div>
</div>
</div>
<!-- end of sidebar -->
</div>
<!-- end of row -->
<div class="container load">
<div class="col-lg-10">
<div class="wrapper">
<div class="row">
<div class="col-md-10">
<h2>Page Title</h2>
<div class="form-horizontal" role="form" action="/details" method="post">
<div class="form-group">
<h3 class="inner">General</h3>
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="" placeholder="title" focus>
</div>
</div>
<div class="form-group">
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="title" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="title">
</div>
</div>
<div class="headers">
<h3>Information</h3>
<p>
Info titletitletitletitletitletitletitletitletitle </br>
titletitletitletitletitletitletitletitletitletitletitletitletitletitletitle
</p>
</div>
<div class="form-group">
<h3 class="inner">Address</h3>
<label for="unit" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="1">
</div>
</div>
<div class="form-group">
<label for="streetNo" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="title" placeholder="25">
</div>
</div>
<div class="form-group">
<label for="streetName" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="streetName" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="suburb" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="suburb" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="zip" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="zip" placeholder="title">
</div>
</div>
<div class="form-group">
<label for="state" class="col-md-2 col-sm-2 control-label custom-label">title</label>
<div class="col-md-6 col-sm-6">
<input type="text" class="form-control input-text" id="state" placeholder="title">
</div>
</div>
<div class="headers">
<h3>Social Networks</h3>
</div>
<div class="form-group social">
<div class="col-md-2 col-sm-2">
<label for="instagram" class="control-label custom-label"><span><i class="fa fa-instagram"></i></span> Instagram</label>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" class="form-control input-text" id="instagram-input" placeholder="instagramhandle">
</div>
</div>
<div class="form-group social">
<div class="col-md-2 col-sm-2">
<label for="twitter" class="control-label custom-label"><span><i class="fa fa-twitter"></i></span> Twitter</label>
</div>
<div class="col-md-5 col-sm-5">
<input type="text" class="form-control input-text" id="twitter-input" placeholder="twitterhandle">
</div>
</div>
<div class="row submission">
<div class="form-group btn-block">
<div class="pull-right">
<button type="button" class="btn btn-default btn-lg btn-cancel ">Cancel changes</button>
<button type="button" class="btn btn-default btn-lg btn-save">Save changes</button>
</div>
</div>
</div>
</div> <!-- end of form -->
</div>
</div> <!-- end of row -->
<!-- </div> end of container -->
</div>
</div>
</div>
<!-- end of container -->