How to let my mask do not overflow the panel? - css

I want to put my loading mask on the panel form.
The example below doesn't work as expected, the mask is overflowing the panel body. How do I make the mask width 100% of the panel body.
.mask {
position: absolute;
background-color: rgba(102, 102, 102, 0.5);
width: 100%;
height: 100%;
min-height: 150px;
z-index: 9999;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.mask .loading {
margin: 0 auto;
display: block;
background-color: #666666;
color: #ffffff;
width: 100px;
height: 100px;
padding-top: 20px;
padding-left: 22px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<h2>Panel Mask</h2>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-default" style="box-sizing: border-box;">
<div class="panel-body">
<div class="mask">
<span class="loading">
<i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>Loading...
</span>
</div>
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-md-3 control-label" for="username">名稱</label>
<div class="col-md-4">
<input name="username" id="username" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label" for="description">備註</label>
<div class="col-md-8">
<textarea class="form-control" id="description" name="description"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"></label>
<div class="col-md-8">
<button type="button" class="btn btn-default" (click)="save()">Update</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>

Add the top and left property to your mask.
Then, remove the width property, and add a 15px margin from the right (right: 15px), because the gutter of bootstrap containers is 15px.
And here you go.
.mask {
position: absolute;
background-color: rgba(102,102,102,0.5);
height: 100%;
min-height: 150px;
z-index: 9999;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
top: 0;
left: 0;
right: 15px;
}
.mask .loading {
margin: 0 auto;
display: block;
background-color: #666666;
color: #ffffff;
width: 100px;
height: 100px;
padding-top: 20px;
padding-left: 22px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-lg-10 col-lg-offset-1"><h2>Panel Mask</h2></div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-default" style="box-sizing: border-box;">
<div class="panel-body">
<div class="mask">
<span class="loading">
<i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>Loading...
</span>
</div>
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-md-3 control-label" for="username">名稱</label>
<div class="col-md-4">
<input name="username" id="username" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label" for="description">備註</label>
<div class="col-md-8">
<textarea class="form-control" id="description" name="description"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label" ></label>
<div class="col-md-8">
<button type="button" class="btn btn-default" (click)="save()" >Update</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>

Related

thins are a little messy in different resolution

I have div like this
<div class="row ">
<div class="page-account-box ">
<div class="col-lg-6 col-md-6 mx-auto ">
<div class="account-box">
<div class="picture_account">
<img src="~/images/p1.jpg" class="imgFormat" style=" top: 60px; left: 60px;" />
</div>
<div class="account-box-content mt-3">
<form method="post" class="form-account" asp-action="signup" id="signupForm">
<div class="row pt-3 ">
<div class="col-6">
<div class="form-account-label-input ">
<label>Firstname<span class="star-red"> *</span></label>
<input asp-for="FirstName" type="text" class="w-100">
<span asp-validation-for="FirstName" class="text-danger star-red"></span>
</div>
</div>
<div class="col-6">
<div class="form-account-label-input">
<label>Lastname<span class="star-red"> *</span></label>
<input asp-for="LastName" type="text" class="w-100">
<span asp-validation-for="LastName" class="text-danger star-red"></span>
</div>
</div>
</div>
<div class="row pt-3 row-margin">
<div class="col-12">
<div class="form-account-label-input">
<label>Email</label>
<input asp-for="Email" type="text" class="w-100">
</div>
</div>
</div>
<div class="row pt-3 row-margin">
<div class="col-6">
<div class="form-account-label-input ">
<label>Password <span class="star-red"> *</span></label>
<input asp-for="Password" type="password" class="w-100">
<span asp-validation-for="Password" class="text-danger star-red"></span>
</div>
</div>
<div class="col-6">
<div class="form-account-label-input">
<label>Repeat Password <span class="star-red"> *</span></label>
<input asp-for="ConfirmPassword" type="password" class="w-100">
<span asp-validation-for="ConfirmPassword" class="text-danger star-red"></span>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
and this is Css
.page-account-box {
width: 100%;
}
.page-account-box .account-box {
width: 100%;
height: auto;
padding: 0;
border: 1px solid #e2efef;
-webkit-box-shadow: 0 12px 12px 0 hsla(0,0%,70.6%,.11);
box-shadow: 0 15px 23px 0 hsla(0, 0%, 71%, 0.29);
position: relative;
margin: 20px auto 30px;
display: flex;
background: #fff;
border-radius: 20px;
}
.page-account-box .account-box .picture_account {
display: inline;
}
.page-account-box .account-box .account-box-content {
min-height: 50%;
padding: 15px 20px;
border-radius: 20px;
width: 100%;
}
.page-account-box .account-box .picture_account .imgFormat {
-moz-box-shadow: 10px 10px 5px #ccc;
-webkit-box-shadow: 10px 10px 5px #ccc;
box-shadow: 10px 10px 5px #ccc;
-moz-border-radius: 25px;
-webkit-border-radius: 25px;
border-radius: 25px;
position: relative;
background-color: darkgoldenrod;
}
.form-account {
padding: 0px;
margin: 0px;
}
if I make in third line to , so it will be ok in 1280*1024 but ok in higher resolution
when the display is in 1920* 1080, it looks great, but when I change the display to 1280* 1024, it looks a little messy. how to make it to be ok in both resolution?
You should learn/explore media queries within CSS:
https://drafts.csswg.org/mediaqueries/#width
There are plenty of examples on how to use it:
/* here generic css*/
#media (min-width: 1280px) {
/* if width is at least 1280px, apply some change. Example: */
.page-account-box .account-box {
width: 90%;
height: auto;
}
}
or maybe you would need:
#media (400px <= width <= 700px) {
/* adjust for mobile devices within these constraints */
...
}

Align a row to the center using bootstrap 4.0 [duplicate]

This question already has answers here:
Bootstrap Center Vertical and Horizontal Alignment
(17 answers)
Closed 2 years ago.
i have the following markup which uses bootstrap 4:-
<div class="container">
<div class="row">
<div class="col-xl-4 col-md-6 col-lg-4">
<div class="footer_widget">
<h3 class="footer_title">
Enter your number
</h3>
<form asp-action="Search" method="get" class="newsletter_form">
<input type="text" name="number" placeholder="Enter your number" style="height: 50px;
background: #fff;
padding-left: 20px;
font-size: 15px;
color: #000;
border: 1px solid #596672;
border-radius: 30px;
width: 100%;">
<button type="submit" style="
position: absolute;
height: 40px;
border: none;
color: #fff;
background: #2EBDBE;
padding: 0 22px;
cursor: pointer;
border-radius: 30px;
top: 5px;
right: 5px;
font-size: 13px;
font-weight: 500;">
Submit
</button>
</form>
<p class="newsletter_text">
Enter your number/name and click on submit ....
</p>
</div>
</div>
</div>
</div>
currently the content will be align to the left, but i want it to be aligned to the center, so how i can do so using bootstrap ?
Bootstrap 4 has utility class to achieve this so try to use class justify-content-center with row like:
<div class="container">
<div class="row justify-content-center">
<div class="col-xl-4 col-md-6 col-lg-4">
<div class="footer_widget">
<h3 class="footer_title">
Enter your number
</h3>
<form asp-action="Search" method="get" class="newsletter_form">
<input type="text" name="number" placeholder="Enter your number" style="height: 50px;background: #fff;padding-left: 20px;font-size: 15px;color: #000;border: 1px solid #596672;border-radius: 30px;width: 100%;">
<button type="submit" style="position: absolute;height: 40px; border: none;color: #fff;background: #2EBDBE; padding: 0 22px; cursor: pointer; border-radius: 30px; top: 5px; right: 5px; font-size: 13px; font-weight: 500;">
Submit
</button>
</form>
<p class="newsletter_text">
Enter your number/name and click on submit ....
</p>
</div>
</div>
</div>
</div>
Hope it helps

bootstrap 4 body scrolling issue

I am using my university project for Flexbox Grid i added
<div class="header">
<div id="content-top">,<div id="content"> and<div class="footer">.
<div class="header"> is fixed, <div id="content"> can be scroll-y
and footer is fixed, they all are working but i have some issue, body always can scroll i am trying to hide body scroll using overflow: hidden; but its not work for me, cannot scroll content part, how can i fix it
Thanks
/* Show it is fixed to the top */
body #add-newbookings {
overflow: hidden;
}
#content {
max-height: calc(100% - 60px);
overflow-y: scroll;
padding: 0px 5% !important;
margin-top: 120px !important;
}
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.bg-inverse {
background-color: grey!important;
}
.header {
width: 100%;
height:5%;
background:grey;
position:fixed;
top: 0;
}
.footer {
width: 100%;
height: 60px;
background: grey;
position: fixed;
bottom: 0;
}
.card {
position: initial;
}
#content-top {width: 100%;
margin-top: 2em;
padding:1.5%;
background:white;
position:fixed;
top: 0;}
/*--------------------------------------------------Add new booking ------------------------------------*/
/*add-newbooking text fileds*/
#add-newbooking .form-control {
display: block;
width: 100%;
padding: 0.1rem 0.75rem;
font-size: 1rem;
line-height: 1.25;
color: #464a4c;
background-color: #f4f4f5;
background-image: none;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 0px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
-webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
-o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
}
/*add-newbooking creditcardbtn*/
#add-creditcard-btn .btn-primary {
color: #b89981;
background-color: #f4f4f5;
border-color: #f4f4f5;
}
/*/add-newbooking creditcardbtn*/
/*button cansel-confirm*/
#cancel-btn .btn-outline-secondary {
color: #343636;
width: 94%;
background-image: none;
background-color: #f4f4f5;
border-color: #f4f4f5;
margin: 0.5rem 0.5rem;
}
#confirm-btn .btn-outline-secondary {
olor: #ffffff;
width: 94%;
background-image: none;
background-color: #bda18b;
border-color: #bda18b;
margin: 0.5rem 0.5rem;
}
/*/button cansel-confirm*/
.add-text {color: #232323; font-size: 1.2em;}
/*add newbooking between textfilds space */
/*/add newbooking between textfilds space */
/*----------------------------------------------------/Add new booking ----------------------------------*/
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>
<body id="add-newbookings">
<div class="header">
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">Dashboard</div>
<div class="p-2"></div>
<div class="p-2">Menu</div>
</div>
</div>
<div id="content-top">
<div class="add-text">
<div class="d-flex justify-content-center">Add New
</div>
</div>
</div>
<div id="contents">
<div id="add-newbooking">
<div class="card">
<div class="card-block">
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">my</div>
<div class="p-2"> <div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput" placeholder="">
</div>
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">To</div>
<div class="p-2"><div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput" placeholder="">
</div>
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">house
</div>
<div class="mr-auto p-2">Add
</div>
<div class="p-2">000
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">Add
</div>
<div class="mr-auto p-2">Add
</div>
<div class="p-2">00.00
</div>
</div>
<hr>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">Total A
</div>
<div class="p-2">00.00
</div>
</div>
</div>
</div>
<br>
<div class="card">
<div class="card-block">
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">Name
</div>
<div class="p-2"><div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput-name" placeholder="">
</div>
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">city
</div>
<div class="p-2"><div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput-mobile" placeholder="">
</div>
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">country
</div>
<div class="p-2"><div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput-email" placeholder="">
</div>
</div>
</div>
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">email
</div>
<div class="p-2"><div class="form-group">
<input type="text" class="form-control" id="formGroupExampleInput-notes" placeholder="">
</div>
</div>
</div>
</div></div>
<br>
<div class="card">
<div class="card-block">
<div class="d-flex justify-content-end">
<div class="mr-auto p-2">total
</div>
<div class="p-2">$00.00
</div>
</div>
<div class="d-flex flex-nowrap">
<div class="order-last p-2">
<div id="add-creditcard-btn">
<button type="button" class="btn btn-primary">Add home information</button></div>
</div>
<div class="p-2"></div>
<div class="order-first p-2"></div>
</div>
</div></div>
<div class="d-flex justify-content-end">
<div id="cancel-btn">
<button type="button" class="btn btn-outline-secondary">Cancel</button>
</div>
<div id="confirm-btn">
<button type="button" class="btn btn-outline-secondary">Confirm</button>
</div>
</div>
</div>
</body>
what I have found in your code is a CSS issue. you have
body #add-newbookings {
overflow: hidden;
}
#add-newbookings /* will be considered as child element of body */
To solve it
either use
body#add-newbookings {
overflow: hidden;
}
#contents {
overflow: auto;
height: 100%;
}
or
body {
overflow: hidden;
}
#contents {
overflow: auto;
height: 100%;
}
Please correct <div id="contents"> as <div id="content"> and check.

Bootstrap Responsive container gets height cropped

I am quite new to Bootstrap. I tried to create a boostrap slider that contains on the left side a container with a logo, some text and on the right side a login form. Unfortunately my code is not working properley and my logo and the html form gets cropped once the browsers has a reduced resolution shrinks.
Here is my code: https://jsfiddle.net/bebetxx/z7w2bbso/3/
my CSS
.blue-container
{
color: white;
background-color:#3C8DBC;
}
.blue-container h2,p
{
color: #D2D6DE;
}
.black-container
{
background-color: #2D2D2D;
}
.black-container h2,p
{
color: #BBBBBB;
}
.image-container
{
background: url("http://www.hogash-demos.com/ammon_html/images/sliders/full-slider/slide4.jpg") no-repeat center center scroll;
background-size: cover;
min-height: 350px;
height: 350px;
overflow: hidden;
}
/*SLIDER HEADER
============================================================*/
.slider {
background: url("http://www.hogash-demos.com/ammon_html/images/sliders/full-slider/slide4.jpg")no-repeat center center scroll;
background-size: cover;
min-height: 450px;
height: 300px;
overflow: hidden;
}
.slider-wrap{
padding: 10px 0px;
}
.slider-img{}
.slider-img img{
width: 300px;
height: 500px;
}
.slider{}
.slider-content{
padding-top: 80px;
}
.slider h1 {
margin: 0 0 20px 0;
font-size: 50px;
color: #fff;
text-transform: uppercase;
line-height: 60px;
font-weight: 700;
}
.slider h2 {
font-family: 'lora', serif;
font-style: normal;
color: #fff;
text-transform: capitalize;
font-size: 27px;
text-shadow: 2px 5px 4px #000000;
}
.slider p {
margin-bottom: 25px;
color: #fff;
}
.top-link {
margin-top: 60px;
}
.top-link a{
padding: 20px 30px;
border-radius: 3px;
background: #fff;
font-weight: 700;
-webkit-transition: all .3s linear 0s;
-o-transition: all .3s linear 0s;
transition: all .3s linear 0s;
}
.top-link a i{
color: #00AEFF;
font-size: 25px;
margin-right: 10px;
}
.top-link a:hover{
background: #00AEFF;
color: #fff;
}
.top-link a:hover i{
color: #fff;
}
.logo-slider {
position:relative;
width: 100% !important;
background-size:cover;
padding-bottom: 35%;
background-repeat: no-repeat;
background-size: auto;
max-width: 100%;
}
<!-- Main content -->
<!-- slider section -->
<section class="slider">
<div class="slider-wrap" >
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-1 "><div class="logo-slider" style="background-image:url(http://design.ubuntu.com/wp-content/uploads/ubuntu-logo32.png)"></div><h2>Connect, discover & change the world</h2><ul class="top-link list-inline"><li><i class="fa fa-android"></i> Register</li></ul></div><a name="loginbox"></a>
<div id="loginbox" style="margin-top:10px;" class="col-md-4 col-md-offset-0 col-sm-8 col-sm-offset-2">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Sign In</div>
<div style="float:right; font-size: 80%; position: relative; top:-10px">Forgot password?</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form id="loginform" class="form-horizontal" action="http://127.0.0.1/login#Login" role="form" method="post">
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="login-username" type="text" class="form-control" name="username" value="" placeholder="username or email">
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="login-password" type="password" class="form-control" name="password" placeholder="password">
</div>
<input type="hidden" name="val" value="checkin">
<div class="input-group">
<div class="checkbox">
<label>
<input id="login-remember" type="checkbox" name="remember" value="1"> Remember me
</label>
</div>
</div>
<div style="margin-top:10px" class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<input type="submit" value="Login" class="btn btn-success">
<a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>
</div>
</div>
<div class="form-group">
<div class="col-md-12 control">
<div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
Don't have an account?
<a href="http://127.0.0.1/#Registration" <!--onClick="$('#loginbox').hide(); $('#signupbox').show()" -->
<strong>Sign Up Now</strong>
</a>
</div>
</div>
</div>
</form>
</div>
</div> </div>
</div>
</div> <!-- row end -->
</div> <!-- container end -->
</section>
<section id="counter-area" class="blue-container">
<div class="container">
<div class="row">
<div class="heading-inner text-center">
<h2 class="sec-title">Register to <span style="color:white !important"><?php if (isset($g_sWebsiteName)) echo $g_sWebsiteName ?> </span> </h2>
<p><strong>Register right away to this amazing community</strong></p>
<?php
$this->view('registration_box');
?>
</div>
</div> <!-- heading row end -->
</div> <!-- container end -->
</section>
thanks to #Skelly the 2nd problem was that the main slider has a height:300px limit.
The 1st problem was solved using a instead of the div logo used

how to make reponsive model popup in bootstrap version 3?

i wan to show the popup on few area for html :
for 1st popup will cover box no 5, 6,9,11
and 2nd popup will cover box no,7,8,10,12
and when i do re size my browser, it should cover those box :
for this, i created this : please check the following html in jsfiddle.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
.margin1 {
padding-bottom: 5px;
padding-left: 2.5px!important;
padding-right: 2.5px!important;
}
.fixwidh {
/*min-width: 295px;*/
}
.btnClass {
width: 40%;
height: 20%;
}
.topmargin {
height: 10px;
width: 100%;
}
.sidemargin {
background-color: #e0e0e0;
}
.mainContent {
width: 94%;
background-color: red;
}
.verticaltextname1 {
position: absolute;
color: gray;
-webkit-text-shadow: 1px 1px 3px rgba(150,150,150,1);
text-shadow: 1px 1px 3px rgba(150,150,150,1);
font-size: 20px;
font-family: Raleway,Arial!important;
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
top: 20px;
}
.topBox {
min-height: 121px;
margin-bottom: 10px;
margin-right: -20px;
background-color: grey;
}
.topBox2 {
min-height: 121px;
margin-bottom: 10px;
margin-top: 20px;
margin-right: -20px;
background-color: #c2c2c2;
box-shadow: 0px 0px 10px #000000;
border-top: 1px solid #cbcbcb;
border-left: 1px solid #f6f6f6;
border-bottom: 1px solid #c5c5c5;
border-right: 1px solid #cdcdcd;
}
.topBox3 {
min-height: 64px;
margin-bottom: 10px;
margin-right: -20px;
background-color: grey;
}
.pClass {
color: #ffffff;
-webkit-transform: rotate(-90deg);
margin-top: 82px;
min-width: 71px;
}
</style>
</head>
<body>
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-md-1 col-lg-1 col-sm-1 col-xs-1">
<div class="row">
<div class="pClass">Work History</div>
<div>
<span class="verticaltextname1">1</span>
</div>
<div>
<span class="verticaltextname1">2</span>
</div>
<div class="pClass">Projects</div>
</div>
</div>
<div class="col-md-10 col-lg-10 col-sm-10 col-xs-10">
<div class="row">
<div class="col-md-3 col-sm-6">
<div class="topBox2">1</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox2">2</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox2">3</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox2">4</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6">
<div class="topBox">5</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox">6</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox">7</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="topBox">8</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="topBox3">
9
</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="topBox3">
10
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<div class="topBox">
11
</div>
<div>X</div>
</div>
<div class="col-md-6 col-sm-6">
<div class="topBox">
12
</div>
</div>
</div>
</div>
<div class="col-md-1 col-lg-1 col-sm-1 col-xs-1">
<div class="sidemargin">
</div>
</div>
</div>
<div class="row">
<div class="col-md-1 col-lg-1 col-sm-1 col-xs-1">
<div class="sidemargin">
</div>
</div>
<div class="col-md-10 col-sm-10">
<div style="background-color: black; height: 100%; width: 102%; border: 1px solid red;">
Carousel Div
</div>
</div>
<div class="col-md-1 col-lg-1 col-sm-1 col-xs-1">
<div class="sidemargin">
</div>
</div>
</div>
<div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Basic Modal</h4>
</div>
<div class="modal-body">
<h3>Modal Body</h3>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://getbootstrap.com/dist/js/bootstrap.min.js"></script>
</div>
</body>
</html>

Resources