I am looking for a solution for the following scenario. I am using the Bootstrap NavBar. Further I managed to display a full-width image on top of the NavBar, see the screenshot below.
On the left hand side there normally is another figure. See this JsFiddle for both the HTML and CSS code, the following listing provides an excerpt of the relevant code.
#header {
width: 100%;
background-image: url(http://s23.postimg.org/9ym003hd7/headbg.png);
background-repeat: repeat-x;
height: 185px;
position: fixed;
}
#header img {
margin-top: 20px;
margin-left: 20px;
}
.navbar-fixed-top {
top: 140px;
padding-right: 20px;
}
.wrap > .container {
padding: 210px 15px 20px;
}
I want the following behaviour: When the content is long enough, scrolling down should move both NavBar and header upwards, such that the header eventually is hidden. The NavBar however should stay at the top of the page, even if the content of the page longer. It this possible?
You can use Bootstraps Affix.js for this. You don't need to fix your navbar for this so it's been removed as well as the position of the header itself.
Just add the data attributes to your navbar and the affix class in your CSS for your height requirement.
See working example Snippet.
#header {
background-image: url(http://placehold.it/185x185/f00/fff);
background-repeat: repeat-x;
height: 185px;
}
.navbar.affix {
width: 100%;
margin-top: -185px;
}
/* Breadcrumps */
.kras-breadcrumb {
list-style: outside none none;
font-size: 1.3em;
font-weight: bold;
margin-bottom: 0;
}
.kras-breadcrumb > li {
display: inline;
vertical-align: middle;
line-height: 50px;
}
.kras-breadcrumb > li + li::before {
color: #ff0000;
content: "\2022 ";
padding: 0 6px;
}
.kras-breadcrumb > .active {
color: #FFFFFF;
}
.kras-breadcrumb li a {
color: #FFFFFF;
}
/* Login form in NavBar */
.navbar input {
height: 20px;
padding: 0;
}
.form-inline .form-control {
width: 110px;
}
.navbar-kras-login {
margin-top: 11px;
margin-bottom: 0px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div id="header"></div>
<nav id="w1" class="navbar-inverse navbar-static-top navbar" role="navigation" data-spy="affix" data-offset-top="185">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w1-collapse"><span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="w1-collapse" class="collapse navbar-collapse">
<ul class="kras-breadcrumb navbar-left">
<li>MySite
</li>
<li class="active">Welcome Page</li>
</ul>
<ul id="w2" class="navbar-nav navbar-right nav">
<li>
<div class="navbar-text pull-right navbar-kras-login">
<form id="w0" class="form-inline" action="/" method="post" role="form">
<input type="hidden" name="_csrf" value="UGdBNWh2SFcyL3hmGxkHNhI/CUACGB01PDITdzckJWclP3h5LhohYw==">
<div class="form-group field-loginform-username required">
<label class="sr-only" for="loginform-username">Username</label>
<input type="text" id="loginform-username" class="form-control" name="LoginForm[username]" placeholder="Username">
</div>
<div class="form-group field-loginform-password required">
<label class="sr-only" for="loginform-password">Password</label>
<input type="password" id="loginform-password" class="form-control" name="LoginForm[password]" placeholder="Password">
</div>
<button type="submit" class="btn btn-primary btn-xs">Login</button>
</form>
</div>
</li>
</ul>
</div>
</nav>
<div class="container">
<div class="site-index">
<div class="jumbotron">
<h1>Congratulations!</h1>
<p class="lead">You have successfully created your Yii-powered application.</p>
<p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
</p>
</div>
<div class="body-content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
</div>
</div>
Related
I have these 3 columns, and it was built using a grid.
How do I make the grey background the same height for all columns?
Ideally not changing this html structure and using css only.
I tried making the div "content" 100% height but doesn't work.
Thanks!
.block-news__container {
max-width: 1280px;
margin: 0 auto;
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
column-gap: 30px;
}
.block-news__container ._item {
width: 100%;
}
.block-news__container ._item ._image {
width: 100%;
height: 310px;
object-fit: cover;
}
.block-news__container ._item ._content {
background-color: #ccc;
padding: 50px 30px 80px;
position: relative;
margin-top: 10px;
}
<div class="block-news__container">
<div class="_item"><img alt="image-news-1" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
<div class="_item"><img alt="image-news-2" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit </p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
<div class="_item"><img alt="image-news-3" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in </p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
</div>
Make the height of the .block-news__container ._item ._content class with manual value. you can fix the height of the content container as you desired to get same height for all the containers.
.block-news__container {
max-width: 1280px;
margin: 0 auto;
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
column-gap: 30px;
}
.block-news__container ._item {
width: 100%;
}
.block-news__container ._item ._image {
width: 100%;
height: 310px;
object-fit: cover;
}
.block-news__container ._item ._content {
background-color: #ccc;
padding: 50px 30px 80px;
position: relative;
margin-top: 10px;
height:250px;
}
<div class="block-news__container">
<div class="_item"><img alt="image-news-1" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
<div class="_item"><img alt="image-news-2" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit </p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
<div class="_item"><img alt="image-news-3" class="_image" src="https://dummyimage.com/600x400/000/fff">
<div class="_content">
<h3>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod</h3>
<p>tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in </p><img alt="icon-arrow-green" width="30" src="https://e7.pngegg.com/pngimages/503/684/png-clipart-right-arrow-simple-rounded-arrow-right-icons-logos-emojis-arrows.png">
</div>
</div>
</div>
vertical size is based on content or specific size
you can add height: 300px (or whatever measurement you desire) to ensure the same size
I have hard-coded two expandable rows which work fine. However, when I try to introduce ng-repeat the rows will no longer expand.
Working version: https://jsbin.com/tiwufiz/3/edit?html,js,console,output
ng-repeat version: https://jsbin.com/tiwufiz/5/edit?html,js,console,output
In the ng-repeat version all I have done is delete the second row, introduced ng-repeat and done ng-binding on the title...
<div class="row" ng-repeat="tut in demo.tutorials">
<div class="col-md-2"></div>
<div class="col-md-8">
<button class="collapsible">{{tut.title}}</button>
<div class="content">
<video class="video-js vjs-big-play-centered" controls preload="false" width="640" height="264"
style="display:block; margin: 0 auto">
<source src="resources/comercial.mp4" type="video/mp4">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
supports HTML5 video
</p>
</video>
<div class="mt10 mb10">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</div>
</div>
</div>
</div>
FIXED
I wrapped the for loop inside a $timeout (zero secs)
I am trying to make a shader to go all the way to the left (or right) depending on my page. The problem comes with using the container.
What I want:
HTML:
<div class="container">
<div class="col-xs-5">
<div class="shader" style="margin-top: 500px;">
<h3>Super cool title</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</div>
</div>
And the following CSS:
.shader {
background-color: rgb(254, 254, 254);
background-color: rgba(254, 254, 254, 0.85);
padding: 15px;
border-radius: 5px;
}
The problem is, if I put it inside the container, it won't go to the side. If I put it outside the container, It won't stop after the col block.
I have tried this with a fluid container, but it still won't go all the way to the side. I also have to do a lot of trickery to align things out properly.
Two problems:
All col divs need to be in a row div. You're missing a row div.
Both types of container divs have 15px of padding. If you want content inside of it flush with the edge you need to either:
Remove the padding from the container class so everything in the container touches the edges or
Give your shader a negative margin so the other elements in the container do not to touch the edge.
Example below assumes you only want the shader to touch the edge. I also added an image placeholder as the background so you can see the shader touches the edge. You only need the change to the shader class:
body {
background: url(http://placehold.it/1000x1000);
background-size: cover;
}
.shader {
background-color: rgb(254, 254, 254);
background-color: rgba(254, 254, 254, 0.85);
padding: 15px;
margin-left: -15px;
border-radius: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<div class="container-fluid">
<div class="row">
<div class="col-xs-5">
<div class="shader" style="margin-top: 500px;">
<h3>Super cool title</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</div>
<div class="col-xs-7">
</div>
</div>
</div>
So, I'm trying out some column code to get three columns lined up perfectly. Unfortunately, when I attempted it, I got the left and right columns floating over the middle column, like so:
http://i.imgur.com/p4ln5Ri.png
This is the css code I used. For reference, #left means the left column, #main the middle, and #right the right column.
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>3-Column</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="ThreeColumnProjectCSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header"><h1>Header</h1></div>
<div>
<div class="column">
<h1>Left</h1>
<ul>
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipisicing elit</li>
<li>Sed do eiusmod tempor incididunt</li>
<li>Ut labore et dolore magna aliqua</li>
<li>Ut enim ad minim veniam</li>
</ul>
</div>
<div class="column">
<h1>Header - Main</h1>
<p>Ullamco laboris nisi sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. In reprehenderit in voluptate lorem ipsum dolor sit amet, velit esse cillum dolore. Sunt in culpa ut enim ad minim veniam, consectetur adipisicing elit. In reprehenderit in voluptate qui officia deserunt sed do eiusmod tempor incididunt.</p>
<p>Excepteur sint occaecat duis aute irure dolor sunt in culpa. Quis nostrud exercitation consectetur adipisicing elit. In reprehenderit in voluptate lorem ipsum dolor sit amet, cupidatat non proident. Ut labore et dolore magna aliqua.</p>
<p>Quis nostrud exercitation qui officia deserunt eu fugiat nulla pariatur. Consectetur adipisicing elit, lorem ipsum dolor sit amet, in reprehenderit in voluptate. Quis nostrud exercitation ut aliquip ex ea commodo consequat. Velit esse cillum dolore qui officia deserunt ut labore et dolore magna aliqua.</p>
<p>In reprehenderit in voluptate sunt in culpa. Sed do eiusmod tempor incididunt ullamco laboris nisi velit esse cillum dolore. In reprehenderit in voluptate ut aliquip ex ea commodo consequat. Excepteur sint occaecat lorem ipsum dolor sit amet, quis nostrud exercitation.</p>
<p>Eu fugiat nulla pariatur. Ut labore et dolore magna aliqua. Ullamco laboris nisi ut enim ad minim veniam, in reprehenderit in voluptate. Quis nostrud exercitation ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, velit esse cillum dolore.</p>
</div>
<div class="column">
<h1>Right</h1>
<p>Sed do eiusmod tempor incididunt excepteur sint occaecat duis aute irure dolor.</p>
</div>
</div>
</body>
</html>
CSS:
html, body {
margin: 0px;
padding: 0px;
border: 0px;
}
#left {
position: absolute;
left:0px;
top:100px;
width:200px;
background:#fff;
border:1px solid #000;
padding: 0px 5px;
}
#right {
position: absolute;
right:0px;
top:100px;
width:200px;
background:#fff;
border:1px solid #000;
padding: 0px 5px;
}
#header {
background:#fff;
/* IE 5.5 */
height:81px;
border-top:1px solid #000;
border-right:1px solid #000;
border-left:1px solid #000;
voice-family: "\"}\"";
voice-family: inherit;
/* IE 6 */
height: 99px;
}
html]body #banner {
/* Mozilla and Safari */
height: 99px;
}
#main {
background:#fff;
/* these two margins affect IE 5.5 */
margin-left: 200px;
margin-right:200px;
border:1px solid #000;
padding: 0px 5px;
voice-family: "\"}\"";
voice-family: inherit;
/* these two margins affect IE 6 */
margin-left: 200px;
margin-right:200px;
}
html]body #main {
/* these two margins affect Mozilla and Safari */
margin-left: 212px;
margin-right:212px;
}
#footer {
width: 100%;
height: 35px;
border: solid #000000;
border-width: 1px 0;
margin: 0;
}
I appreciate the help.
I would get rid of the position absolute and use a grid system.
For example: http://jsfiddle.net/C6CnJ/7/
.row { clear: both; }
.column {
width: 130px;
margin: 0 10px 20px;
float: left;
}
<div class="row">
<div class="column">Lorem ipsum...</div>
<div class="column">Lorem ipsum...</div>
<div class="column">Lorem ipsum...</div>
</div>
<div class="row">
<div class="column">Hello!</div>
</div>
I know it's easy enough to wrap text around images by floating the image right or left & then putting your text after it, but what I am wanting to do is wrap other elements around it as well, such as div's.
I tried to set my div to inline & this worked fine, however once I added other divs inside that div it still looked fine, but when looking at it in Firebug the little blue line that shows the element you are hovering over in the code extended over the image as well & when I attempted to add padding to the container div it didn't work & you could see that was because the padding was added right at the end.
I ended up getting it to look ok but adding padding to the image, however it still doesn't seem the right way to go about it seeing as Firebug doesn't like it & I am worried about compatibility issues.
Here is an image of what I am trying to do.. the gray area is where I want the text/elements to wrap & the brown is the image.
Here is some example code: (This example is the not wrapping version)
<div class="main">
<img src="../images/work/example.png" width="275" height="233" class="screenshot" alt="Example" />
<div class="details">
<div class="about">
<div class="title">
About:
</div>
<div class="info">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
<!-- Info Ends -->
</div>
<!-- About Ends -->
</div>
<!-- Details Ends -->
<div class="contentClear"></div>
</div>
<!-- Main Ends -->
Example CSS:
#content .wrapper .left .main {
padding-top: 20px;
width: 550px;
}
#content .wrapper .left .main .screenshot {
float: right;
border: 1px solid #c0c0c0;
width: 275px;
}
#content .wrapper .left .main .details {
width: 263px;
padding-right: 10px;
}
#content .wrapper .left .main .details .title {
color: #0F5688;
font-size: 1.8em;
font-family: arial;
font-weight: bold;
}
#content .wrapper .left .main .details .info {
margin-top: 6px;
font-size: 1.3em;
font-family: Arial;
color: #636363;
line-height: 1.6;
}
Here is an image showing the issue FireBug has with it (from the JSFiddle example), as I say it looks fine on the browser, but seeing as the firebug bar extends all the way over the image I was worried that may cause problems..
Yes, the correct way to move something to one side and have stuff wrap around it is to float the element.
In the example below (simplified from your code), adding padding to the floated image works just fine.
CSS:
.main .screenshot {
float: right;
border: 1px solid #c0c0c0;
padding: 5px;
}
.main .title{
font-size: 140%;
}
HTML:
<div class="main">
<img src="img/png" width="150" height="117" class="screenshot" alt="Example" />
<div class="details">
<div class="about">
<div class="title">About:</div>
<div class="info">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
</div>
</div>
</div>
Demo jsFiddle