Inside container div i have two columns. Column 1 height is dynamic, I want column 2 height to match according with column 1. I tried using display: table property but it's not working. How can i achieve it using css? I get this problem when column 1 displays errors and it's height increases. How do i set both column same height using css?
HTML
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-10 col-lg-offset-2 col-lg-8">
<div class="row">
<div class="col-md-7 pr-0">
<section class="tile new-su-tile1">
<!-- tile body -->
<div class="tile-body p-40">
<form name="signupForm" role="form" ng-submit="userSignupMethod(signupForm)" novalidate>
<div class="row">
<div class="col-sm-offset-1 col-sm-10">
<div class="form-group">
<input type="text" class="form-control" name="firstname" ng-model="userSignup.firstname"
ng-pattern="/^[a-zA-Z\s]*$/" required autocomplete="off" placeholder="Your Name" id="firstname" >
<span ng-messages="((signupForm.firstname.$touched && signupForm.firstname.$error) || (signupForm.$submitted && signupForm.firstname.$error))"
role="alert">
<span class="error_msg" ng-message="required">Please complete this mandatory field.</span>
<span class="error_msg" ng-message="pattern">Please enter valid name.</span>
</span>
</div>
</div>
<div class="col-sm-offset-1 col-sm-10">
<div class="form-group">
<input type="text" class="form-control" name="lastname" ng-model="userSignup.lastname"
ng-pattern="/^[a-zA-Z\s]*$/"
required autocomplete="off" placeholder="Your Last Name" id="lastname" >
<span ng-messages="((signupForm.lastname.$touched && signupForm.lastname.$error) || (signupForm.$submitted && signupForm.lastname.$error))"
role="alert">
<span class="error_msg" ng-message="required">Please complete this mandatory field.</span>
<span class="error_msg" ng-message="pattern">Please enter valid name.</span>
</span>
</div>
</div>
<div class="col-sm-offset-1 col-sm-10">
<div class="form-group">
<input type="text" class="form-control" name="email" ng-model="userSignup.email"
ng-pattern="/^[a-zA-Z0-9._]+[a-zA-Z0-9._]+#[a-z-A-Z.]{2,50}$/" required autocomplete="off" id="email" placeholder="Your Email ID">
<span ng-messages="((signupForm.email.$touched && signupForm.email.$error) || (signupForm.$submitted && signupForm.email.$error))"
role="alert">
<span class="error_msg" ng-message="required">Please complete this mandatory field.</span>
<span class="error_msg" ng-message="pattern">Please enter valid email.</span>
</span>
</div>
</div>
<div class="col-sm-offset-1 col-sm-10">
<div class="form-group">
<input type="text" class="form-control" name="contactnumber" ng-model="userSignup.contactnumber"
ng-pattern="/^[0-9]{10,15}$/" autocomplete="off" id="contactnumber" placeholder="Mobile Number" minlength="10" maxlength="15">
<span ng-messages="((signupForm.contactnumber.$touched && signupForm.contactnumber.$error) || (signupForm.$submitted && signupForm.contactnumber.$error))"
role="alert">
<span class="error_msg" ng-message="pattern">Please enter valid contact number.</span>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-offset-3 col-sm-6">
<button class="btn btn-block btn-login b-0 br-2 mr-5" analytics-event="click" analytics-category="sign up">Sign Up</button>
</div>
</div>
<!-- Modal HTML ng-disabled="enquiryForm.$invalid "-->
<div id="successSignUp" class="modal fade modal-md thank-you">
<div id="loadingImag" ng-if="loadingImag" class="content-center">
<a href="" class="myIcon icon-info icon-ef-6 icon-color">
<i class="fa fa-refresh fa-spin fa-3x"></i>
</a>
</div>
<div id="messageBox" ng-if="messageBox" class="modal-dialog modal-sm">
<div class="modal-content content-center modal-md ">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">x
</button>
<h2 class="modal-title">Thank You</h2>
</div>
<div class="modal-body">
<div class="ng-scope ng-binding" ng-class="messageColor ? 'text-success' : 'text-lightred'" data-ng-repeat="alert in alerts">
{{alert.message}} <br>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-default btn-sm btn-ef btn-ef-3"
ng-click="redirecttoSinup()">OK
</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- /tile body -->
<!-- tile footer -->
<div class="tile-footer new-tile-footer text-center ">
<!-- SUBMIT BUTTON -->
<p class="pt-5">Already a user?
<a ui-sref="login" class="login-link">Log in to your account</a></p>
</div>
<!-- /tile footer -->
</section>
<!-- /tile -->
</div>
<div class="col-md-5 pl-0">
<section class="tile new-su-tile2">
<div class="ysu-heading pt-36">Why Sign Up?</div>
<ul class="pl-0">
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>Apply & Manage your Visa Applications with Ease</li>
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>Store all Visa related documents in one secure vault for easy future reference </li>
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>Access your Visa related documents anytime, anywhere all ine one place</li>
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>All your data is stored making re-applying easier and faster</li>
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>Automatically fills in your Visa form next time you need to travel</li>
<li class="ysu-subheading"><i class="fa fa-check pr-8 pt-2 ysu-icon"></i>Tag your family as applicants</li>
</ul>
</section>
</div>
</div>
</div>
</div>
<div ng-include="'components/navbar/quick-links.html'"></div>
</div>
CSS (less format)
.new-su-tile1 {
& .form-control {
height: 38px;
border: 1px solid #acacac;
font-style: normal;
}
& .error_msg {
font-size: 10px;
}
& .btn-login {
background: #32a9de;
}
}
.new-su-main-tile2 {
margin-left: -1px;
& .new-su-tile2 {
min-height: 308px;
#media ( max-width:#screen-xs-max) {
border-left: 1px solid #acacac;
margin-left: 15px;
margin-right: -15px;
}
#media ( max-width:#screen-sm-max) {
border-left: 1px solid #acacac;
margin-left: 15px;
margin-right: -15px;
}
& .ysu-heading {
color: #86c049;
text-align: center;
}
& .ysu-subheading {
list-style: none;
color: #333333;
list-style: none;
display: inline-flex;
font-size: 12px;
text-align: left !important;
padding: 8px 0;
&:first-child {
padding-top: 25px;
}
/*&:last-child {
padding-bottom: 29px;
}*/
& .ysu-icon {
font-size: 10px;
}
}
}
}
.new-tile-footer {
background: #fff;
color: #333333;
font-size: 12px;
& .login-link {
color: #32a9de !important;
}
}
#user6371206 Please check following example. i hope you are expecting the same.
var elements = document.getElementsByClassName('features');
var elementHeights = Array.prototype.map.call(elements, (el) => {
return el.clientHeight;
});
var maxHeight = Math.max(...elementHeights)
Array.prototype.forEach.call(elements, (el) => el.style.height = `${maxHeight}px`);
.a { height: 30px; background-color: red; }
.b { height: 220px; background-color: aqua; }
.c { height: 50px; background-color: blue; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<div class="features a"></div>
<div class="features b"></div>
<div class="features c"></div>
Related
My whole page has weird white spacing on the right side of it and I can't tell where it is coming from.
I tried to reset the padding and margin, but clearly it hasn't helped.
It's my first time using bootstrap and I am guessing it might be something with it, but I seems like bootstrap by default has nothing like it and all I've used was basically col-x stuff.
style.css
#import url("https://fonts.googleapis.com/css?family=Poppins:400,500,700");
html,
body {
height: 100%;
width: 100%;
font-family: "Poppins", sans-serif;
color: #222;
padding: 0;
margin: 0;
}
/*--Navigation--*/
.navbar {
padding: 0.8rem;
}
.navbar-nav li {
padding-right: 20px;
}
.nav-link {
font-size: 1.1em !important;
color: #f7f7f7;
}
.nav-link:hover {
color: #f7f7f7;
}
.bg-blue {
background-color: #12232e;
border-bottom: 3px solid #007cc7;
}
.navbar-brand h1 {
color: #f7f7f7;
}
.navbar-brand h1:hover {
color: #f7f7f7;
text-decoration: none;
}
.navbar .navbar-nav .nav-link {
position: relative;
color: #f7f7f7;
}
.navbar .navbar-nav .nav-link::after {
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
background-color: #f7f7f7;
color: #f7f7f7;
width: 0%;
content: "";
height: 3px;
transition: all 0.5s;
}
.navbar .navbar-nav .nav-link:hover::after {
width: 100%;
color: #f7f7f7;
}
.navbar .navbar-nav .nav-link:active {
width: 100%;
color: #f7f7f7;
}
.nav-item {
font-size: 130%;
}
.custom-toggler.navbar-toggler {
border-color: rgb(247, 247, 247);
}
.navButton {
float: right;
width: 45%;
height: 35%;
}
/*--Navigation--*/
/*--Slider--*/
.carousel-inner img {
width: 100%;
height: 100%;
}
.carousel-caption {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.carousel-caption h1 {
font-size: 500%;
text-transform: uppercase;
text-shadow: 1px 1px 10px #000;
}
.carousel-caption h3 {
font-size: 200%;
font-weight: 500;
text-shadow: 1px 1px 10px #000;
padding-bottom: 1rem;
}
/*--Slider--*/
/*--Jumbotron/Welcome--*/
.lead {
font-size: 145%;
}
/*--Jumbotron/Welcome--*/
/*--footer--*/
footer {
background-color: #3f3f3f;
color: #d5d5d5;
padding-top: 2rem;
}
hr.light {
border-top: 1px solid #d6d6d6;
width: 75%;
}
/*--footer--*/
/*---Media Queries --*/
#media (max-width: 1162px) {
.carousel-caption h1 {
font-size: 350%;
}
}
#media (max-width: 768px) {
.carousel-caption {
top: 45%;
}
.carousel-caption h1 {
font-size: 250%;
}
.carousel-caption h3 {
font-size: 140%;
font-weight: 500;
padding-bottom: 0.2rem;
}
.carousel-caption .btn {
font-size: 95%;
padding: 8px 14px;
}
.display-4 {
font-size: 200%;
}
.navButton {
float: right;
width: 50%;
}
.navbar-toggler {
float: right;
}
}
#media (max-width: 576px) {
.carousel-caption {
font-size: 70%;
top: 40%;
}
.carousel-caption h1 {
font-size: 150%;
}
.carousel-caption h3 {
font-size: 110%;
font-weight: 500;
padding-bottom: 0.2rem;
}
.carousel-caption .btn {
font-size: 90%;
padding: 4px 8px;
}
.nav-link {
font-size: 60% !important;
}
.navbar-toggler {
float: right;
}
.navButton {
float: none;
width: 100%;
}
}
/*---Firefox Bug Fix --*/
.carousel-item {
transition: -webkit-transform 0.5s ease;
transition: transform 0.5s ease;
transition: transform 0.5s ease, -webkit-transform 0.5s ease;
-webkit-backface-visibility: visible;
backface-visibility: visible;
}
/*--- Fixed Background Image --*/
figure {
position: relative;
width: 100%;
height: 60%;
margin: 0 !important;
}
.fixed-wrap {
clip: rect(0, auto, auto, 0);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#fixed {
background-image: url("img/mac.png");
position: fixed;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center center;
-webkit-transform: translateZ(0);
transform: translateZ(0);
will-change: transform;
}
/*--- Bootstrap Padding Fix --*/
[class*="col-"] {
padding: 1rem;
}
/*
Extra small (xs) devices (portrait phones, less than 576px)
No media query since this is the default in Bootstrap
Small (sm) devices (landscape phones, 576px and up)
#media (min-width: 576px) { ... }
Medium (md) devices (tablets, 768px and up)
#media (min-width: 768px) { ... }
Large (lg) devices (desktops, 992px and up)
#media (min-width: 992px) { ... }
Extra (xl) large devices (large desktops, 1200px and up)
#media (min-width: 1200px) { ... }
*/
index.php
<?php
include_once('header.php');
?>
<body>
<!-- Navigation -->
<nav class="navbar navbar-dark navbar-expand-md bg-blue sticky-top">
<div class="container-fluid">
<div class="row" style="width: 100%; margin-left: 0px; margin-right: 0px; align-items:center;">
<div class="col-md-4 col-xs-6">
<a class="navbar-brand" href="#">
<h1 class="display-4 d-none d-md-block">Petitions</h1>
</a>
</div>
<div class="col-md-4 col-xs-6">
<button
class="navbar-toggler custom-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarResponsive"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#">Начало</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Цел на компанията</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">За компанията</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4 col-xs-6">
<button type="button" data-toggle="modal" data-target="#modalLoginForm" class="btn btn-primary btn-lg navButton">
Влизане
</button>
</div>
</div>
</div>
</nav>
<!-- Navigation -->
<!-- Image Slider -->
<div id="slides" class="carousel slide" data-ride="carousel">
<ul class="carousel-indicators">
<li data-target="#slides" data-slide-to="0" class="active"></li>
<li data-target="#slides" data-slide-to="1"></li>
<li data-target="#slides" data-slide-to="2"></li>
</ul>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="parent d-flex justify-content-center">
<img src="img/background.png" />
</div>
<div class="carousel-caption">
<h1 class="display-1">Против неравеноството си?</h1>
<h3>Бъди промяната!</h3>
<button type="button" class="btn btn-primary btn-lg">
Виж петиции
</button>
</div>
</div>
<div class="carousel-item">
<div class="parent d-flex justify-content-center">
<img src="img/background2.png" />
</div>
</div>
<div class="carousel-item">
<div class="parent d-flex justify-content-center">
<img src="img/background3.png" />
</div>
</div>
</div>
</div>
<!--- Image Slider -->
<!--- Modal -->
<div class="modal fade" id="modalLoginForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Sign in</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-3">
<div class="md-form mb-5">
<i class="fas fa-envelope prefix grey-text"></i>
<input type="email" id="defaultForm-email" class="form-control validate">
<label data-error="wrong" data-success="right" for="defaultForm-email">Имейл</label>
</div>
<div class="md-form mb-4">
<i class="fas fa-lock prefix grey-text"></i>
<input type="password" id="defaultForm-pass" class="form-control validate">
<label data-error="wrong" data-success="right" for="defaultForm-pass">Парола</label>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-default">Влизане</button>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-default" data-toggle="modal" data-target="#modalRegisterForm">Регистрация</button>
</div>
</div>
</div>
</div>
<!--- Modal -->
<!--- Register Modal -->
<div class="modal fade" id="modalRegisterForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Sign up</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-3">
<div class="md-form mb-5">
<i class="fas fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-name" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-name">Име</label>
</div>
<div class="md-form mb-5">
<i class="fas fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-email">Имейл</label>
</div>
<div class="md-form mb-4">
<i class="fas fa-lock prefix grey-text"></i>
<input type="password" id="orangeForm-pass" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-pass">Паорла</label>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-deep-orange">Sign up</button>
</div>
</div>
</div>
</div>
<!--- Register Modal -->
<!--- Jumbotron -->
<!--<div class="container-fluid">
<div class="row jumbotron">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10">
<p class="lead">
A web hosting service allows individuals and organizations to make
their website accessible via the World Wide Web.
</p>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 col-xl-2">
<a href="#"
><button type="button" class="btn btn-outline-secondary btn-lg">
Web Hosting
</button></a
>
</div>
</div>
</div>-->
<!--- Welcome Section -->
<div class="container-fluid padding">
<div class="row welcome text-center">
<div class="col-12">
<h1 class="display-4">Цел на компанията</h1>
</div>
<hr />
<div class="col-12">
<p class="lead">
Нашата компания е създадена с цел постигане на положителна промяна в
ежедневието и живота на хора, които са част от различни малцинства,
възрастови групи, както и йерархични постове, живота на животни,
както и на всекиго, който е неспособен да се бори за себе си.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-3"></div>
<div class="col-6"><hr class="my-4" /></div>
<div class="col-3"></div>
</div>
<!--- Welcome Section #2 -->
<div class="container-fluid padding">
<div class="row welcome text-center">
<div class="col-12">
<h1 class="display-4">Повече за компанията</h1>
</div>
<hr />
<div class="col-12">
<p class="lead">
Ние вярваме, че не само думите, но и делата са важни.
</p>
</div>
</div>
</div>
<!--- Three Column Section -->
<!--- Two Column Section -->
<!--- Fixed background -->
<!--- Emoji Section -->
<!--- Meet the team -->
<!--- Cards -->
<!--- Two Column Section -->
<!--- Connect -->
<!--- Footer -->
<?php
include_once('footer.php');
?>
</body>
</html>
header.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Petitions Site</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
footer.php
<footer style="background-color:#12232e;">
<div class="container-fluid">
<div class="row text-center">
<div class="col-md-4">
<img src="img/w3newbie.png" />
<hr class="light" />
<p>555-555-5555</p>
<p>email#myemail.com</p>
<p>100 street Name</p>
<p>City, State, 0000</p>
</div>
<div class="col-md-4">
<hr class="light" />
<h5>Our hours</h5>
<hr class="light" />
<p>Monday: 9am - 5pm</p>
<p>Saturday: 10am - 4pm</p>
<p>Sunday: closed</p>
</div>
<div class="col-md-4">
<hr class="light" />
<h5>Our hours</h5>
<hr class="light" />
<p>555-555-5555</p>
<p>email#myemail.com</p>
<p>100 street Name</p>
<p>City, State, 0000</p>
</div>
<div class="col-12">
<hr class="light" />
<h5>© petitions.bg</h5>
</div>
</div>
</div>
</footer>
I recreated your issue in CodePen and inspected the elements...
That space on the right of your page is created by an element that is wider than all the others.
There is a CSS rule coming from _grid.scss for .row. A simple fix would be to override it with !important as below.
.row{
margin-left: 0 !important;
margin-right: 0 !important;
}
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Petitions Site</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-dark navbar-expand-md bg-blue sticky-top">
<div class="container-fluid">
<div class="row" style="width: 100%; margin-left: 0px; margin-right: 0px; align-items:center;">
<div class="col-md-4 col-xs-6">
<a class="navbar-brand" href="#">
<h1 class="display-4 d-none d-md-block">Petitions</h1>
</a>
</div>
<div class="col-md-4 col-xs-6">
<button class="navbar-toggler custom-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#">Начало</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Цел на компанията</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">За компанията</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4 col-xs-6">
<button type="button" data-toggle="modal" data-target="#modalLoginForm" class="btn btn-primary btn-lg navButton">
Влизане
</button>
</div>
</div>
</div>
</nav>
<!-- Navigation -->
<!-- Image Slider -->
<div id="slides" class="carousel slide" data-ride="carousel">
<ul class="carousel-indicators">
<li data-target="#slides" data-slide-to="0" class="active"></li>
<li data-target="#slides" data-slide-to="1"></li>
<li data-target="#slides" data-slide-to="2"></li>
</ul>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="parent d-flex justify-content-center">
<img src="img/background.png" />
</div>
<div class="carousel-caption">
<h1 class="display-1">Против неравеноството си?</h1>
<h3>Бъди промяната!</h3>
<button type="button" class="btn btn-primary btn-lg">
Виж петиции
</button>
</div>
</div>
<div class="carousel-item">
<div class="parent d-flex justify-content-center">
<img src="img/background2.png" />
</div>
</div>
<div class="carousel-item">
<div class="parent d-flex justify-content-center">
<img src="img/background3.png" />
</div>
</div>
</div>
</div>
<!--- Image Slider -->
<!--- Modal -->
<div class="modal fade" id="modalLoginForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Sign in</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-3">
<div class="md-form mb-5">
<i class="fas fa-envelope prefix grey-text"></i>
<input type="email" id="defaultForm-email" class="form-control validate">
<label data-error="wrong" data-success="right" for="defaultForm-email">Имейл</label>
</div>
<div class="md-form mb-4">
<i class="fas fa-lock prefix grey-text"></i>
<input type="password" id="defaultForm-pass" class="form-control validate">
<label data-error="wrong" data-success="right" for="defaultForm-pass">Парола</label>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-default">Влизане</button>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-default" data-toggle="modal" data-target="#modalRegisterForm">Регистрация</button>
</div>
</div>
</div>
</div>
<!--- Modal -->
<!--- Register Modal -->
<div class="modal fade" id="modalRegisterForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Sign up</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-3">
<div class="md-form mb-5">
<i class="fas fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-name" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-name">Име</label>
</div>
<div class="md-form mb-5">
<i class="fas fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-email">Имейл</label>
</div>
<div class="md-form mb-4">
<i class="fas fa-lock prefix grey-text"></i>
<input type="password" id="orangeForm-pass" class="form-control validate">
<label data-error="wrong" data-success="right" for="orangeForm-pass">Паорла</label>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button class="btn btn-deep-orange">Sign up</button>
</div>
</div>
</div>
</div>
<!--- Register Modal -->
<!--- Jumbotron -->
<!--<div class="container-fluid">
<div class="row jumbotron">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10">
<p class="lead">
A web hosting service allows individuals and organizations to make
their website accessible via the World Wide Web.
</p>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 col-xl-2">
<a href="#"
><button type="button" class="btn btn-outline-secondary btn-lg">
Web Hosting
</button></a
>
</div>
</div>
</div>-->
<!--- Welcome Section -->
<div class="container-fluid padding">
<div class="row welcome text-center">
<div class="col-12">
<h1 class="display-4">Цел на компанията</h1>
</div>
<hr />
<div class="col-12">
<p class="lead">
Нашата компания е създадена с цел постигане на положителна промяна в
ежедневието и живота на хора, които са част от различни малцинства,
възрастови групи, както и йерархични постове, живота на животни,
както и на всекиго, който е неспособен да се бори за себе си.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-3"></div>
<div class="col-6">
<hr class="my-4" />
</div>
<div class="col-3"></div>
</div>
<!--- Welcome Section #2 -->
<div class="container-fluid padding">
<div class="row welcome text-center">
<div class="col-12">
<h1 class="display-4">Повече за компанията</h1>
</div>
<hr />
<div class="col-12">
<p class="lead">
Ние вярваме, че не само думите, но и делата са важни.
</p>
</div>
</div>
</div>
<!--- Three Column Section -->
<!--- Two Column Section -->
<!--- Fixed background -->
<!--- Emoji Section -->
<!--- Meet the team -->
<!--- Cards -->
<!--- Two Column Section -->
<!--- Connect -->
<!--- Footer -->
<footer style="background-color:#12232e;">
<div class="container-fluid">
<div class="row text-center">
<div class="col-md-4">
<img src="img/w3newbie.png" />
<hr class="light" />
<p>555-555-5555</p>
<p>email#myemail.com</p>
<p>100 street Name</p>
<p>City, State, 0000</p>
</div>
<div class="col-md-4">
<hr class="light" />
<h5>Our hours</h5>
<hr class="light" />
<p>Monday: 9am - 5pm</p>
<p>Saturday: 10am - 4pm</p>
<p>Sunday: closed</p>
</div>
<div class="col-md-4">
<hr class="light" />
<h5>Our hours</h5>
<hr class="light" />
<p>555-555-5555</p>
<p>email#myemail.com</p>
<p>100 street Name</p>
<p>City, State, 0000</p>
</div>
<div class="col-12">
<hr class="light" />
<h5>© petitions.bg</h5>
</div>
</div>
</div>
</footer>
</body>
Hi I am trying to align the label tag, text and submit input types to the left and align the 17 total orders to the right side of the page aligned vertically with the Date label and horizontally right aligned with the end of the paragraph tag "Shipping List is Finalized Everyday at 5pm EST".
So far I have gotten the label tag and two input tags aligned where I would like them, but the span tag is not aligning completely to the right side. I am using bootstrap 4.1.1.
Here is my code:
.main {
margin: 15px 0;
}
.btn-appear {
color: #000000;
background-color: #e6e6e6;
border: 3px solid #b3b3b3;
}
.btn-appear:focus {
box-shadow: 0 0 0 .1em rgba(186, 208, 226, .5);
}
.btn-appear:active {
color: #ffffff;
background-color: #4d4d4d;
border-color: #bad0e2;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="row main" style="background-color: #ffffff">
<div class="col-12">
<h3>Shipping / Loading List</h3>
<div class="">
<p class="float-left">Select Shipping / Loading Date</p>
<p class="float-right">Shipping List is Finalized Everyday at 5pm EST.</p>
</div>
<!-- Form code begins -->
<div class="row container justify-content-between">
<div class="col-4 row" style="background-color: antiquewhite">
<form method="post">
<div class="form-group">
<!-- Date input -->
<label class="control-label d-block" for="date">Date:</label>
<div class="form-inline d-inline-block">
<input class="form-control" id="date" name="date" size="10" placeholder="MM/DD/YYYY" type="text" />
<input class="btn btn-appear" name="submit" type="submit" value="Search">
</div>
</div>
</form>
</div>
<span class="col-4 text-right" style="background-color: aliceblue">
17 Total Orders for <span id="demo"></span>
</span>
</div>
</div>
</div>
.main{
margin-top: 15px;
}
.btn-appear{
color: #000000;
background-color: #e6e6e6;
border: 3px solid #b3b3b3;
}
.btn-appear:focus{
box-shadow:0 0 0 .1em rgba(186,208,226,.5);
}
.btn-appear:active{
color:#ffffff;
background-color: #4d4d4d;
border-color: #bad0e2;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row main" style="background-color: #ffffff">
<div class="col-12">
<h3>Shipping / Loading List</h3>
<p class="float-left">Select Shipping / Loading Date</p>
<p class="float-right">Shipping List is Finalized Everyday at 5pm EST.</p>
</div>
</div>
<div class="row justify-content-between">
<div class="col-4" style="background-color: antiquewhite">
<form method="post">
<div class="form-group">
<label class="control-label d-block" for="date">Date:</label>
<div class="form-inline d-inline-block">
<input class="form-control" id="date" name="date" size="12" placeholder="MM/DD/YYYY" type="text"/>
<input class="btn btn-appear" name="submit" type="submit" value="Search">
</div>
</div>
</form>
</div>
<span class="col-4 text-right" style="background-color: aliceblue">
17 Total Orders for <span id="demo"></span>
</span>
</div>
</div>
Sorry it took me so long to respond with my solution. I actually changed a lot of it. Here is my solution:
.main{
margin: 15px 0;
}
.btn-appear{
color: #000000;
background-color: #e6e6e6;
border: 3px solid #b3b3b3;
}
.btn-appear:focus{
box-shadow:0 0 0 .1em rgba(186,208,226,.5);
}
.btn-appear:active{
color:#ffffff;
background-color: #4d4d4d;
border-color: #bad0e2;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row main">
<div class="col-12">
<h3>Shipping / Loading List</h3>
<p class="float-left">Select Shipping / Loading Date</p>
<p class="float-right">Shipping List is Finalized Everyday at 5pm EST.</p>
</div>
</div>
<!-- Form code begins -->
<div class="row main justify-content-between">
<div class="col-4">
<form method="post">
<div class="form-group">
<label class="control-label d-block" for="date">Date:</label>
<div class="form-inline d-inline-block">
<input name="date" class="form-control" id="date" type="text" size="12" placeholder="MM/DD/YYYY">
<input name="submit" class="btn btn-appear" type="submit" value="Search">
</div>
</div>
</form>
</div>
<div class="col-4 text-right">
17 Total Orders for <span id="demo">Wed Aug 29 2018</span>
</div>
</div>
</div>
I have created a form using Ionic Creator.
https://creator.ionic.io/share/fdd3f4198103
I am unable to see the borders of select as you can see in my image below.
Source code is :
<script src="http://code.ionicframework.com/1.3.1/js/ionic-angular.js"></script>
<script src="http://code.ionicframework.com/1.3.1/js/ionic.js"></script>
<link href="http://code.ionicframework.com/1.3.1/css/ionic.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.min.js"></script>
<ion-view title="Credentials" id="page9" class=" ">
<ion-content padding="true" class="has-header">
<form id="credentials-form11" class="list ">
<label class="item item-select " id="credentials-select5">
<span class="input-label">Select Router</span>
<select>
<option>HData</option>
<option>Ajay</option>
<option>Test</option>
</select>
</label>
<ion-checkbox>Create Hotspot</ion-checkbox>
<label class="item item-input item-stacked-label " id="credentials-input13">
<span class="input-label">Password</span>
<input type="password" placeholder="sample">
</label>
<ion-checkbox>Show Password</ion-checkbox>
</form>
<div class="list card " id="credentials-card21">
<ion-item class="item-icon-left dark " id="credentials-list-item7">
<i class="icon ion-stats-bars"></i>Progress</ion-item>
<div style="margin: 0px; line-height: 250px; text-align: center; background-color: rgb(232, 235, 239);">
<i class="icon ion-image" style="font-size: 64px; color: rgb(136, 136, 136); vertical-align: middle;"></i>
</div>
<div class="item item-body " id="credentials-list-item-container1">
<p id="credentials-null" style="margin-top:0px;color:#000000;" class=" ">Some friendly
<strong>markdown</strong>
</p>
</div>
</div>
<div id="credentials-button-bar4" class=" button-bar ">
<button id="credentials-button7" class=" button button-positive button-block ">Clear</button>
<button id="credentials-button8" class=" button button-positive button-block ">Continue</button>
</div>
</ion-content>
</ion-view>
My output in application is as below.
If anyone could help with the problem of border would be really helpful.
I also applied class for border .itemborder{
border: 1px solid #4a87ee;
border-radius: 3px;
margin:10px;
} but its not working.
I am using django-allauth, bootstrap, font awesome and bootstrap-social for the social media login buttons in my login form. I can't figure out how to center the social buttons within my login-well below. It appears to be aligning to the right of the login well instead of centered. What should I be doing?
jsfiddle
html:
<div class="container">
<div class="row row-centered">
<div class="col-md-4 col-centered">
<div class="well login-well">
<div class="socialaccount_ballot col-md-11">
<ul class="socialaccount_providers">
<li>
<a title="Google" class="btn btn-block btn-social btn-md socialaccount_provider btn-google" href="/accounts/google/login/?process=+login+">
<i class="fa fa-google"></i>Log in with Google
</a>
</li>
<li>
<a title="Facebook" class="btn btn-block btn-social btn-md socialaccount_provider btn-facebook" href="/accounts/facebook/login/?process=+login+">
<i class="fa fa-facebook"></i>Log in with Facebook
</a>
</li>
<li>
<a title="Twitter" class="btn btn-block btn-social btn-md socialaccount_provider btn-twitter" href="/accounts/twitter/login/?process=+login+">
<i class="fa fa-twitter"></i>Log in with Twitter
</a>
</li>
</ul>
</div>
<div class="col-md-12">
<hr>
<form class="login" method="POST" action="/login/">
<div class="form-group"><label class="control-label" for="id_login">Username</label><input autofocus="autofocus" class="form-control" id="id_login" maxlength="30" name="login" placeholder="Username" required="required" title="" type="text" /></div>
<div class="form-group"><label class="control-label" for="id_password">Password</label><input class="form-control" id="id_password" name="password" placeholder="Password" required="required" title="" type="password" /></div>
<div class="form-group"><div class="checkbox"><label for="id_remember"><input class="" id="id_remember" name="remember" type="checkbox" /> Remember Me</label></div></div>
<div class="form-group pull-center">
<button class="btn btn-primary btn-block" type="submit">Sign In</button>
</div>
</form>
<hr>
</div>
<div class="form-group">
<small><a class="text-muted" href="/password_reset/">Forgot Password?</a></small>
<br>
<small><a class="text-muted" href="/signup/">Sign up</a></small>
</div>
</div>
</div>
</div>
</div>
css:
.row-centered {
text-align:center;
}
.col-centered {
display:inline-block;
float:none;
/* reset the text-align */
text-align:left;
/* inline-block space fix */
margin-right:-4px;
}
.socialaccount_providers li a.socialaccount_provider {
rem-border: 1px solid #ddd;
border-radius: 2px;
rem-box-shadow: 2px 2px 8px rgba(0,0,0,.7);
-padding: 10px;
margin-bottom: 6px;
display: block;
width: 100%;
overflow: hidden;
rem-font-size: 1.2em;
}
.socialaccount_providers li a.socialaccount_provider:hover {
text-decoration: none;
box-shadow: 1px 1px 2px rgba(0,0,0,.7);
}
.socialaccount_providers li a.socialaccount_provider.facebook {
background: #4B67A3;
color: #fff;
}
.socialaccount_providers li a.socialaccount_provider.facebook:before {
font-family: FontAwesome;
font-size: 1.9em;
content: "\f082";
display: inline-block;
padding-left: 8px;
padding-right: 8px;
}
What I want it to look like when social buttons are centered:
The ul.socialaccount_providers has a inexplicit padding-left = 40px;
Just throwing in .socialaccount_providers {padding-left:0;} fixes it.
Is there a way to cut-off using elements in my design or it is good enough? I use Boostrap CSS library.
1) CSS:
body {
border: 3px solid black;
min-width: 1800px;
}
#search_box {
border: 3px solid red;
background-color: white;
color: black;
text-align: left;
margin-bottom: 15px;
width: 40%;
}
#search_filter_border {
border: 3px solid green;
/*border: 1px outset gray;*/
float: left;
padding: 10px;
}
#search_categories_filter {
border: 3px solid blue;
line-height: 20px;
height: 420px;
width: 250px;
float: left;
padding: 10px;
margin: 5px 5px 5px 5px;
}
#search_additional_filters {
border: 3px solid brown;
width: 700px;
float: left;
padding: 10px;
margin: 5px 5px 5px 5px;
}
#top20 {
border: 3px solid gray;
width: 650px;
padding: 5px;
margin: 5px 5px 5px 50px;
float: left;
}
2) HTML:
<div id="search_box">
<h2>Поиск мероприятий:</h2>
<div id="searchKeyword" class="input-group">
<i class="glyphicon glyphicon-search input-group-addon"></i>
<input type="text" class="form-control" placeholder="Часть названия мероприятия" ng-model="actionsQuery.searchText" on-enter="queryResult()">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" ng-click="queryResult()">Найти мероприятия</button>
</span>
</div>
</div>
<div id="search_filter_border">
<div id="search_categories_filter">
<label>Типы мероприятий:</label><br/>
<button class="btn btn-link btn-mini" ng-click="UpdateCheckBoxes()">
<span ng-show="checkBoxesState">Выбрать все</span>
<span ng-hide="checkBoxesState">Снять выделение</span>
</button>
<div class="row-fluid" ng-repeat="at in actionsQuery.actionTypes">
<div class="checkbox">
<label><input type="checkbox" ng-model="at.checked">{{at.Description}}</label>
</div>
</div>
</div>
<div id="search_additional_filters">
<label tooltip-popup-delay='400' tooltip-placement="right" tooltip="Минимальная дата - текущая, Максимальная - текущая плю год">Дата сеансов:</label>
<div class="form-inline row" role="form">
<div class="col-sm-4">
<div class="input-group">
<label class="input-group-addon"> с</label>
<input datepicker-popup class="form-control col-md-4" type="text" ng-model="actionsQuery.fromDate" is-open="fromDateOpen"/>
<i class="glyphicon glyphicon-calendar input-group-addon" ng-click="toogleDatepicker($event, 'fromDateOpen')"></i>
</div>
</div>
<div class="col-sm-4">
<div class="input-group">
<label class="input-group-addon"> по </label>
<input datepicker-popup class="form-control col-md-4" type="text" ng-model="actionsQuery.toDate" is-open="toDateOpen"/>
<i class="glyphicon glyphicon-calendar input-group-addon" ng-click="toogleDatepicker($event, 'toDateOpen')"></i>
</div>
</div>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-addon"><input type="checkbox" ng-model="actionsQuery.isOpenDatesIncluded"></span>
<label class="form-control col-md-3">+ открытая дата</label>
</div>
</div>
</div>
<br/>
<!--города, площадки-->
<div class="row">
<div class="form-group col-sm-8">
<label>Город:</label>
<div class="input-group">
<i class="glyphicon glyphicon-filter input-group-addon"></i>
<select class="form-control" ng-model="actionsQuery.city" ng-options="c as c.Name for c in cities"></select>
</div>
<br/>
<label>Площадка мероприятия:</label>
<div class="input-group">
<i class="glyphicon glyphicon-filter input-group-addon"> </i>
<select class="form-control" ng-model="actionsQuery.actionPlace" ng-options="ap as ap.Name for ap in actionPlaces"></select>
</div>
</div>
</div>
</div>
<!--Строка данных-->
<div class="row-fluid offset1">
<table class="table table-striped table-condensed table-hover" style="float: left"><!--float: left нужен для корректного отображения в Mozilla -->
<tr ng-repeat="action in actionList">
<td><img ng-src="{{action.ActionLogoUrl?action.ActionLogoUrl:'/img/no_image.gif'}}" /></td>
<td>
<div>
<strong>{{action.Artist}}</strong>
<span class="pull-right"><a class="btn btn-link" ng-click="showSeances(action)" ng-hide="action.seances">Показать сеансы</a></span>
<span class="pull-right"><a class="btn btn-link" ng-click="hideSeances(action)" ng-show="action.seances">Скрыть сеансы</a></span>
</div>
<div class="text-success">
{{action.ActionPlaceName}}
<span ng-show="action.ETicketEnabled>0" class="label label-success">ET</span>
</div>
<!--Таблица сеансов-->
<table class="table table-striped" ng-show="action.seances" style="margin-bottom: 3px; margin-top: 10px;">
<tr ng-class="getSeanceClasses(seance)" ng-repeat="seance in action.seances">
<td>
<h5 class="checkbox">{{seance.title}}</h5>
</td>
<td>
<span ng-show="seance.IsClosed">закрыт</span>
<span class="text-warning" ng-show="seance.IsPaymentsReceived">оплачен</span>
</td>
<td>
{{seance.ActionInfo}}
</td>
<td>
<a class="btn btn-link" ng-href="/Order.aspx?ActionID={{action.Id}}&ActionDate={{seance.ActionDate}}" target="_blank">Заказать</a>
</td>
</tr>
</table>
<span><a class="btn btn-link" ng-show="action.seances.length>seancesLimit" ng-click="seancesLimit=seancesLimit+7">Показать еще...</a></span>
</td>
<td>{{action.BeginActionDate | date:'dd.MM.yyyy HH:mm'}}</td>
</tr>
</table>
<input type="button" class="btn" value="Еще" ng-click="queryNext()" ng-hide="isLastPage" style="float: left"/><!--float: left нужен для корректного отображения в Mozilla -->
</div>
</div>
<div id="top20" class="col-md-4 row-fluid" ng-if="top20 && top20.length!=0">
<label style="text-decoration: underline;">Тоp 20:</label>
<p ng-repeat="t in top20">
<a class="btn-link" ng-href="/Order.aspx?ActionID={{t.ActionID}}" target="_blank">{{t.Artist}}</a>
</p>
</div>
This is how it looks like:
You might wish to use ngInclude for some code reuse.
You don't need to place small templates in separate files. Just include them in main html using script tag with type="text/ng-template":
<script type="text/ng-template" id="foo.html">
<!-- few divs here -->
</script>
UPDATE:
You can package the templates in a separate library.
See $templateCache