Bootstrap classes for positioning - html

What class i need to use to place second button on the same line with first button. I am using bootstrap 4.
<div class="container">
<div class="row justify-content-sm-center">
<div class="col-sm-5 kappa">
<h3>Don't have an account?</h3>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rem quasi facere officiis numquam alias, delectus beatae autem facilis aliquid voluptates aspernatur, eaque suscipit possimus eveniet praesentium explicabo itaque nulla distinctio.
</p>
<button type="button">sign up</button>
</div>
<div class="col-sm-5 kappa">
<h3>Have an account?</h3>
<hr>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit!
</p>
<button type="button" class="">login</button>
</div>
</div>
</div>

Since there is no code provided, assuming you are using Bootstrap 4 and apply flexbox css, in Bootstrap 4 the class is call .d-flex. After you apply .d-flex to parent all the direct descendant can be align easily using margin. In Bootstrap 4 it is call mt-auto and mb-0.
.bigcontainer{
height:300px;
background:grey;
width:40%;
float:left;
margin:10px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<div class="bigcontainer d-flex flex-column">
<div>Title</div>
<div>Sed orci purus, porta ac feugiat ut, tincidunt vel libero. Aenean ultricies porta magna in ultricies. Fusce vitae felis augue.Quisque semper eleifend odio eget feugiat. Curabitur id mi tristique, ultrices lectus quis, gravida tortor..</div>
<div class="mt-auto mb-0"><button>button</button></div>
</div>
<div class="bigcontainer d-flex flex-column">
<div>Title</div>
<div>Sed orci purus, porta ac feugiat ut, tincidunt vel libero. Aenean ultricies porta magna in ultricies. Fusce vitae felis augue. </div>
<div class="mt-auto mb-0"><button>button</button></div>
</div>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<style>
.cs-button {
position: absolute;
bottom: 0;
margin-bottom: 20px;
}
</style>
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" style="height: 200px;">
<div>Title</div>
<div>Sed orci purus, porta ac feugiat ut, tincidunt vel libero. Aenean ultricies porta magna in ultricies. Fusce vitae felis augue.Quisque semper eleifend odio eget feugiat. Curabitur id mi tristique, ultrices lectus quis, gravida tortor..</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 cs-button" style="padding:0" >
<div class="mt-auto mb-0"><button>button</button></div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" style="height: 200px;">
<div>Title</div>
<div>Sed orci purus, porta ac feugiat ut, tincidunt vel libero. Aenean ultricies porta magna in ultricies. Fusce vitae felis augue. </div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 cs-button" style="padding:0">
<div class="mt-auto mb-0"><button>button</button></div>
</div>
</div>
</div>
</div>

Related

Bootstrap 4 - Creating centered and equal width flex items

I'm new to bootstrap still. From what I can tell in terms of layout, you can go with two main options: flex or grid. I'm currently attempting to go with the flexbox method, however I've encountered a problem with width.
My goal is to create three rows (the code I've attached only has 1 row for simplicity) that each have two equal width boxes per row. One box will have a picture and the other box will have text. I also want these boxes to be responsive, so that when the screen is small the boxes stack on top of each other (1 by 1). My only guess for the responsive part is that I use d-md-flex. Here's what I have so far:
<!--Row 1-->
<div class="d-flex flex-column mb-3 text-white">
<div class="d-flex flex-row justify-content-between align-items-center">
<div class="text-center"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" class="img-fluid w-100" alt="Responsive image"></div>
<div class="text-center"><p class="m-0">INTRODUCTION: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac rhoncus sem. Vestibulum consectetur
arcu est, at malesuada dolor posuere in. Cras tincidunt est eget ullamcorper mattis. Sed interdum ultricies venenatis. Nam
nunc neque, imperdiet vitae auctor sed, rhoncus quis enim. Maecenas sit amet purus aliquet, gravida purus sit amet, maximus
ligula. Praesent ut enim arcu. Nunc sit amet orci velit. Sed blandit consectetur suscipit. Vestibulum interdum pharetra
elit, nec pharetra arcu pretium quis. In vel sapien felis.</p></div>
</div>
My problem is that the image turns out really small and to the left, while the text takes up most of the space on the row. I've attempted playing around with flex-grow/shrink and flex-fill however nothing was changed. Any suggestions (on that and the responsiveness if its not too much to ask)?
.parent {
display : flex;
border : solid 1px;
}
.child {
flex : 1;
}
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<div>Using Flex</div>
<div class="parent">
<div class="child bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="child bg-warning"><p class="m-0">INTRODUCTION: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac rhoncus sem. Vestibulum consectetur
arcu est, at malesuada dolor posuere in. Cras tincidunt est eget ullamcorper mattis. Sed interdum ultricies venenatis. Nam
nunc neque, imperdiet vitae auctor sed, rhoncus quis enim. Maecenas sit amet purus aliquet, gravida purus sit amet, maximus
ligula. Praesent ut enim arcu. Nunc sit amet orci velit. Sed blandit consectetur suscipit. Vestibulum interdum pharetra
elit, nec pharetra arcu pretium quis. In vel sapien felis.</p>
</div>
</div>
<div class="parent">
<div class="child bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="child bg-warning"><p class="m-0">Row 2</p>
</div>
</div>
<div class="parent">
<div class="child bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="child bg-warning"><p class="m-0">Row 3</p>
</div>
</div>
<div>Using Grid</div>
<div class="row border border-dark">
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-warning"><p class="m-0">INTRODUCTION: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac rhoncus sem. Vestibulum consectetur
arcu est, at malesuada dolor posuere in. Cras tincidunt est eget ullamcorper mattis. Sed interdum ultricies venenatis. Nam
nunc neque, imperdiet vitae auctor sed, rhoncus quis enim. Maecenas sit amet purus aliquet, gravida purus sit amet, maximus
ligula. Praesent ut enim arcu. Nunc sit amet orci velit. Sed blandit consectetur suscipit. Vestibulum interdum pharetra
elit, nec pharetra arcu pretium quis. In vel sapien felis.</p>
</div>
</div>
<div class="row border border-dark">
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-warning"><p class="m-0">Row 2</p>
</div>
</div>
<div class="row border border-dark">
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-info"><img src="Photos/2019 SB Photos/Whole_Stadium.JPG" alt="Responsive image"></div>
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6 bg-warning"><p class="m-0">Row 3</p>
</div>
</div>
You can do this.
If you want three rows, you need to use display: flex; as well as flex-direction: column; if you use 3 items they will stand up and the first will be on top, the second after, the third on bottom. if you want to make it any more complex, instead of stacking 3 elements, you can stack 3 more flex boxes, then organize the info from there.
check this out
https://www.steveaolsen.com/docs/FlexboxCheatsheet.pdf
let me know if that helps!
i used this sheet every time i'm working in CSS and its a life saver

hover function not able to implement when I click on the image

I came across a hover menu and trying to implement but not able to get the desired effect. On Click on the company logo, a dropdown should appear.
my code:
.client-container{
position: relative;
display: inline-block;
}
.client-content {
display: none;
position: absolute;
background-color: #fff;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
top:0;
transition:337ms ease-in-out;
}
.client-container:hover .client-content {
display: block;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<h2 class="text-center">Our Clients</h2>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="http://pngimg.com/uploads/sony_logo/sony_logo_PNG2.png" width="100" height="80">
<div class="client-content p-4">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center">
<img src="images/tracfone-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/health.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo3_color.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo2_color.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_DKSH-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_david-jones-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/canon.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/roche.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/coles.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_helicord.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/telstra.png">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center text-center">
<button class="btn btn-warning">All Clients</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
Can anybody help me in this issue.In my case hover menu is coming but its hiding the logo.I'm did try with z index but still nothing is happening. It's totally hidden. I'm totally out in the dark how to proceed with this one.Thank You
Just remove the position absolute;
.client-container{
position: relative;
display: inline-block;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
top:0;
background-color: #fff;
transition:337ms ease-in-out;
min-height: 80px;
}
.client-content {
display: none;
min-width: 160px;
}
.client-container:hover .client-content {
display: block;
}
.client-container:hover {
position: absolute;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<h2 class="text-center">Our Clients</h2>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="http://pngimg.com/uploads/sony_logo/sony_logo_PNG2.png" width="100" height="80">
<div class="client-content p-4">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center">
<img src="images/tracfone-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/health.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo3_color.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo2_color.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_DKSH-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_david-jones-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/canon.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/roche.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/coles.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_helicord.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/telstra.png">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center text-center">
<button class="btn btn-warning">All Clients</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
Just change top:0 in your code.
.client-container{
position: relative;
display: inline-block;
}
.client-content {
display: none;
position: absolute;
background-color: #fff;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
top: 80px; /* img's height */
left: 0;
width: 100%;
transition:337ms ease-in-out;
}
.client-container:hover .client-content {
display: block;
}
/* i added border for reference */
.client-container:hover, .client-content{border: 1px solid}.client-container:hover{border-bottom-color:transparent}.client-content{border-top-color:transparent}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<h2 class="text-center">Our Clients</h2>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="http://pngimg.com/uploads/sony_logo/sony_logo_PNG2.png" width="100" height="80">
<div class="client-content p-4">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center">
<img src="images/tracfone-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/health.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo3_color.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/Homepage_slice_4_logo2_color.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_DKSH-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_david-jones-1.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/canon.png">
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center">
<img src="images/roche.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/coles.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/Cnetric_Client_Logo_helicord.png">
</div>
<div class="col-lg-3 text-center">
<img src="images/telstra.png">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center text-center">
<button class="btn btn-warning">All Clients</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
Try This:
.client-container{
position: relative;
display: inline-block;
}
.client-content {
display: none;
position: absolute;
background-color: #fff;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
top:0;
transition:337ms ease-in-out;
}
.client-container:hover .client-content {
display: block;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 mt-5">
<h2 class="text-center">Our Clients</h2>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/1.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/1.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/5.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/5.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/1.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/1.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/2.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
<div class="col-lg-3 text-center client-container">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="80%" height="auto">
<div class="client-content p-4">
<img src="https://www.gstatic.com/webp/gallery/3.sm.jpg" width="100%" height="auto">
<p style="padding-top: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean mattis dui vitae placerat vehicula. Aliquam ante lectus, suscipit non eros eu, mattis tempus turpis. Curabitur iaculis hendrerit dolor quis ultricies. Donec dignissim rutrum lectus
et dignissim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi.</p>
<a class="btn btn-custom">Read More</a>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 text-center text-center">
<button class="btn btn-warning">All Clients</button>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>

Center the login form in the middle of the screen with bootstrap

I am trying to get my login form in the middle of the screen and the company logo on the right above.
In the picture this is what I want to make in bootstrap.
This is my HTML code:
<div class="row">
<div class="col-sm-3">
.col-sm-3
</div>
<div class="col-sm-6">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">
Sign In
</div>
<div class="forgot-password">
Forgot password?
</div>
</div>
<div class="panel-body body-panel-styling">
<form class="form-horizontal" id="loginform"></form>
</div>
</div>
</div>
<div class="col-sm-3">
<img alt="Cerrix" class="img-responsive" src="~/Images/Cerrix-Logo.gif">
</div>
</div>
I already try this website but no luck
https://css-tricks.com/centering-css-complete-guide/
How can I center the login form in the middle of the screen and the company logo on the right above side of the screen?
Kind regards
UPDATE: jsfiddle
https://jsfiddle.net/fok6f2fc/
Would something like this match your needs? Login box centered horizontally and vertically with 100% height columns. Best viewed here on CodePen.
html,body,.container {
height: 100%;
}
#login-box {
display: table;
height: 100%;
}
.container {
display: table;
width: 100%;
padding: 0;
box-sizing: border-box;
}
.row {
height: 100%;
display: table-row;
}
.row .no-float {
display: table-cell;
float: none;
vertical-align: top;
}
.new {
display: table-cell;
vertical-align: middle;
float: none;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-md-3 no-float">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dui augue, sollicitudin et tortor sodales, mollis luctus massa. Praesent non tincidunt neque. Pellentesque facilisis maximus risus, ut porta risus vulputate in. Aliquam erat volutpat. Ut neque mi, tincidunt accumsan diam sed, vehicula vulputate ante. Morbi congue purus nulla, a sodales mi pellentesque id. Vestibulum tempor diam cursus nunc convallis, ac vehicula ipsum faucibus. Aenean malesuada pretium est, id laoreet diam aliquam porta. Aenean elementum pharetra leo id consequat. Pellentesque nec odio leo. Donec luctus nibh orci, sit amet malesuada risus suscipit eget. Maecenas aliquet odio nec vulputate vestibulum. Fusce tincidunt enim a mauris ornare, id iaculis nunc luctus. Donec placerat ex in lorem semper faucibus. Praesent ut tempus erat.</p>
</div>
<div class="col-md-12" id="login-box">
<div class="new"><div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">Sign In</div>
<div class="forgot-password">Forgot password?</div>
</div>
<div class="panel-body body-panel-styling">
<form id="loginform" class="form-horizontal" role="form">
<div class="input-group styling-field">
<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">
</div>
<div class="input-group styling-field">
<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>
<div class="form-group styling-button">
<div class="col-sm-12 controls">
Login
</div>
</div>
</form>
</div>
</div></div>
</div>
<div class="col-md-3 no-float">
<div class="row">
<div class="col-md-12">
<img src="http://placehold.it/300x100" class="img-responsive">
</div>
</div>
<div class="row">
<div class="col-md-12">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus dui augue, sollicitudin et tortor sodales, mollis luctus massa. Praesent non tincidunt neque. Pellentesque facilisis maximus risus, ut porta risus vulputate in. Aliquam erat volutpat. Ut neque mi, tincidunt accumsan diam sed, vehicula vulputate ante. Morbi congue purus nulla, a sodales mi pellentesque id. Vestibulum tempor diam cursus nunc convallis, ac vehicula ipsum faucibus. Aenean malesuada pretium est, id laoreet diam aliquam porta. Aenean elementum pharetra leo id consequat. Pellentesque nec odio leo. Donec luctus nibh orci, sit amet malesuada risus suscipit eget. Maecenas aliquet odio nec vulputate vestibulum. Fusce tincidunt enim a mauris ornare, id iaculis nunc luctus. Donec placerat ex in lorem semper faucibus. Praesent ut tempus erat.
</div>
</div>
</div>
</div>
</div>
use flexbox to align the login form to the center of the parent container:
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
you'll need to extend the height of the your parent div <div class="row"> for the centered field to work. assuming you want this container to fill the whole page, you can use viewport units to achieve it:
https://www.sitepoint.com/css-viewport-units-quick-start/

Using Bootstrap/CSS to make pinterest style layout, posts will not fall right under the above post

My problem is that I want to use bootstrap to create a pinterest type layout. It is for my own website, every time I want to add a new post, I would just add a new <li></li> to the unordered list. Now the only problem is the layout with varying heights causes issues. How could I resolve this but make it easier when I want to continue adding articles. By the way it should be chronological order so that my newest post would be the first one, etc.
Here is the codepen
or the same code:
...
<body>
<h1 class="text-center">Test Site</h1>
<div class="container">
<ul>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 1</h3></div>
<div class="panel-body">
<p>1 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.</p>
</div>
</div>
</li>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 2</h3></div>
<div class="panel-body">
<p>2 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Lorem ipsum dolor sit amet.</p>
</div>
</div>
</li>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 3</h3></div>
<div class="panel-body">
<p>3 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec.</p>
</div>
</div>
</li>
<li class="clearfix"></li>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 4</h3></div>
<div class="panel-body">
<p>4 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.</p>
</div>
</div>
</li>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 5</h3></div>
<div class="panel-body">
<p>5 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. </p>
</div>
</div>
</li>
<li class="col-xs-12 col-sm-6 col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 6</h3></div>
<div class="panel-body">
<p>6 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus.</p>
</div>
</div>
</li>
</ul>
</div>
</body>
I want to have Box 5 & 6 to be right under Box 2 & 3. I don't want the big space between them. What would be the easiest way to make this work, and mobile friendly as well as?
Currently like this, but I want box 5 & 6 to follow underneath not have that extra space etc...:
I know there are jQuery Plugins like Masonry, jQuery Waterfall to help close all those gaps.
if you try to create pinterest-like layout with bootstrap only, you can take a look at Bootstrap 4, http://v4-alpha.getbootstrap.com/components/card/#columns.
codepen demo
<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">
<style>
ul {
list-style-type: none;
padding-left: 0;
-webkit-column-count: 3;
-webkit-column-gap: 10px;
-webkit-column-fill: auto;
-moz-column-count: 3;
-moz-column-gap: 10px;
-moz-column-fill: auto;
column-count: 3;
column-gap: 10px;
column-fill: auto;
}
li{
display: inline-block;
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
column-break-inside: avoid;
}
#media (max-width: 680px) {
ul {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}
</style>
<title>Test Site</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<h1 class="text-center">Test Site</h1>
<div class="container">
<ul>
<li >
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 1</h3></div>
<div class="panel-body">
<p>1 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.</p>
</div>
</div>
</li>
<li>
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 2</h3></div>
<div class="panel-body">
<p>2 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Lorem ipsum dolor sit amet.</p>
</div>
</div>
</li>
<li>
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 3</h3></div>
<div class="panel-body">
<p>3 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec.</p>
</div>
</div>
</li>
<li>
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 4</h3></div>
<div class="panel-body">
<p>4 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.</p>
</div>
</div>
</li>
<li>
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 5</h3></div>
<div class="panel-body">
<p>5 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus. Mi volutpat eget mi viverra pharetra sed, curabitur leo possimus, non amet in eget phasellus, lorem quam, eget praesent semper tempor nam.Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. </p>
</div>
</div>
</li>
<li >
<div class="panel panel-primary">
<div class="panel-heading"><h3>Box 6</h3></div>
<div class="panel-body">
<p>6 Lorem ipsum dolor sit amet, pellentesque lobortis mauris sem pellentesque parturient dolor, semper eu nulla, nunc aenean aenean amet donec, elementum sem repellat tempus ac, sint volutpat vestibulum. Tincidunt et et, justo tincidunt sed tellus mi eu, dolor sed lorem litora ante tincidunt. Pellentesque qui non error lectus.</p>
</div>
</div>
</li>
</ul>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</body>
</html>
Add display:flex; align-items:stretch; to your ul element.

Aligning quotation marks with bottom of row in Bootstrap 3?

I'm trying to create some nice looking blockquotes in Bootstrap by stacking some rows with quotes above and below the quotation, like so just to give you a rough example ( can be seen here (http://www.bootply.com/weEUvuQfw2 ). As seen in the bootply example, the left quotation mark hovers high above the quote, since its character is originally that high when used in a sentence. I imagine it's got to be something simple, but what can I do to get the left quote to hover at the bottom of the top left cell of this grid? setting a negative margin or padding doesn't seem to do it. Any ideas?
<div class="container">
<div class="row right">
<div class=" col-lg-3 ">
<font size="40">“</font>
</div>
<div class="col-lg-6 ">
</div>
<div class="col-lg-3 ">
</div>
</div>
<div class="row center">
<div class=" col-lg-3 ">
</div>
<div class="col-lg-6 ">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet blandit libero. Nullam at tincidunt risus. Nam quis suscipit ligula, ut cursus nunc. Nulla eget eros diam. Aenean bibendum accumsan velit in dapibus. Pellentesque sodales leo nec lacus consequat, nec tempor nibh sollicitudin. Fusce mollis luctus ultrices. Quisque tempus placerat velit, at varius libero pulvinar eu. Curabitur sit amet est velit. Praesent id eleifend nulla, eu iaculis lacus. Integer imperdiet, tellus nec tristique mattis, magna quam luctus tellus, nec semper enim felis eget nisl.
</div><!--
--><div class="col-lg-3 ">
</div>
</div>
<div class="row left">
<div class=" col-lg-3 ">
</div>
<div class="col-lg-6 ">
</div><!--
--><div class="col-lg-3 ">
<font size="72">”
</font></div><font size="72">
</font></div><font size="72">
</font></div><!-- /.container -->
And CSS
.center {
text-align: center;
}
.right {
text-align: right;
}
.left {
text-align: left;
}
Are you looking for something like so?
HTML:
<div class="container">
<div class="row right">
<div class=" col-lg-3 ">
<font size="40">“</font>
</div>
<div class="col-lg-6 ">
</div><!--
--><div class="col-lg-3 ">
</div>
</div>
<div class="row center">
<div class=" col-lg-3 ">
</div>
<div class="col-lg-6 ">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet blandit libero. Nullam at tincidunt risus. Nam quis suscipit ligula, ut cursus nunc. Nulla eget eros diam. Aenean bibendum accumsan velit in dapibus. Pellentesque sodales leo nec lacus consequat, nec tempor nibh sollicitudin. Fusce mollis luctus ultrices. Quisque tempus placerat velit, at varius libero pulvinar eu. Curabitur sit amet est velit. Praesent id eleifend nulla, eu iaculis lacus. Integer imperdiet, tellus nec tristique mattis, magna quam luctus tellus, nec semper enim felis eget nisl.
</div><!--
--><div class="col-lg-3 ">
</div>
</div>
<div class="row left">
<div class=" col-lg-3 ">
</div>
<div class="col-lg-6 ">
</div><!--
--><div class="col-lg-3 ">
<font size="72">”
</font></div><font size="72">
</font></div><font size="72">
</font></div><!-- /.container -->
CSS:
.center {
text-align: center;
}
.right {
text-align: left;
margin-bottom: -20px;
}
.left {
text-align: left;
}
Here is a fiddle: http://jsfiddle.net/4g0gp5pp/
That's a lot of markup to create something really simple.
DEMO: http://jsbin.com/hadapo/1/edit
HTML:
<blockquote class="quotemarks">
<p>Words go here</p>
<footer>Someone</footer>
</blockquote>
CSS
.quotemarks:before,
.quotemarks:after {
text-align: center;
font-size: 60px;
line-height: 1;
}
.quotemarks:before {
content: "\201C";
position: relative;
bottom: -20px;
}
.quotemarks:after {
content: "\201D"
}
.quotemarks {
border: 0;
padding: 0;
text-align: center;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
.quotemarks footer {
text-indent: -10px
}