I have two sibling elements which each contain dynamic content.
<div class="flex">
<div class="sibling-1"></div>
<div class="sibling-2"></div>
</div>
In some cases sibling-1 will have more content then sibling-2 and vice versa.
I would like the height of the second element sibling-2 always equal the height of the first sibling-1. If the height of sibling-2 is greater then the height of sibling-1 it will overflow the flex div and thus be scrollable.
Is there any way to accomplish this with Flexbox?
Yes, it is possible. Leave the sibling setting the max height alone and set the others' flex-basis: 0 and flex-grow: 1, which according to the spec will expand them to their sibling's height. No absolute positioning. No setting height on any elements.
main {
display: flex;
}
section {
display: flex;
flex-direction: column;
width: 7em;
border: thin solid black;
margin: 1em;
}
:not(.limiter)>div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section>
<div>I'm longer and will scroll my overflow. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text
in flow text in flow text in flow text in flow text in flow text in flow text in</div>
</section>
<section class="limiter">
<div>Every parent's siblings match my height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
<section>
<div>I'm shorter but still match the height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
</main>
Is there any way to accomplish this with Flexbox?
Basically, no. The flex equal heights feature is based on the height of the container, not any particular sibling.
So sibling-1 and sibling-2 can always be equal height.
But flexbox has no built-in mechanism to limit the height of items to the height of one sibling.
Consider JavaScript or CSS positioning properties.
Here's an example using absolute positioning:
.flex {
display: flex;
width: 200px;
position: relative;
}
.flex>div {
flex: 0 0 50%;
border: 1px solid black;
box-sizing: border-box;
}
.sibling-2 {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
right: 0;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">text<br>text<br>text<br>text<br>text<br>text<br></div>
<div class="sibling-2">text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br></div>
</div>
jsFiddle
Yes you can accomplish this by making siblings 1 and 2 also flex containers, then on sibling-2 make an absolute div (also flex container) inside that will be the parent of your scroller
<div class="sibling-1 flex sibling"></div>
<div class="sibling-2 flex sibling">
<div class="absolute flex scroller-wrap">
<div class="relative vertical-scroller">
your content here
</div>
</div>
</div>
css:
.relative{
position:relative;
}
.absolute{
position:absolute;
}
.flex{
display:flex;
}
.sibling-2{
flex:1;
}
.scroller-wrap{
height:100%;
}
on sibling 2 just set a minimum height on pixels - useful on responsive cases if siblings 1 and 2 stack each other on mobile
As I mentioned in the comments and has been continued in other answers, there is no flexbox method.
It is possible using position:absolute on the second sibling though...but since that's not actually a flexbox solution, this is here for information only.
.flex {
margin: 1rem auto;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
* {
margin: 0;
outline: 0;
}
.flex {
width: 80%;
margin: 1rem auto;
border: 1px solid grey;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore quia, voluptatum! Perspiciatis praesentium nemo, labore mollitia numquam recusandae voluptatem consectetur amet deleniti cum nesciunt blanditiis, esse quis doloremque vero! Reiciendis
porro impedit perspiciatis. Amet in praesentium molestias ipsum ad quis quia doloribus, veniam unde, ea ducimus rerum porro tenetur voluptatem, a laudantium. Accusantium provident voluptatibus perferendis hic blanditiis laborum amet consequatur
esse, fugiat doloremque consectetur ullam sequi, ratione perspiciatis, voluptatem eaque vitae rem repellendus in architecto vel nulla animi neque. Accusantium animi voluptatum, suscipit possimus,</p>
</div>
<div class="sibling-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque modi quibusdam aliquam officia illo itaque ratione, iste architecto ad blanditiis fugiat sequi laborum cupiditate voluptatum, autem non? Quibusdam ad eius hic rem id. Libero, tempora
dicta reiciendis placeat nihil quia fuga iste aliquid quo minus labore sapiente fugit, similique non aliquam, beatae pariatur nobis fugiat! Ipsam nobis fugit maxime aliquam accusamus explicabo nostrum ab nemo adipisci dolorem qui porro ea pariatur
corporis aut reiciendis optio, sint eum nam suscipit itaque aspernatur recusandae. Cumque qui quod doloremque. Ut voluptates, asperiores, laborum excepturi quam odit, quos rerum assumenda sapiente saepe nisi? Numquam placeat repellat eum dolorem
reprehenderit dolores culpa id explicabo consequuntur. Quas nobis veritatis tempora animi similique earum commodi, laborum blanditiis dolor illo, eaque accusamus aliquid nam a ex, velit, maiores natus. Id totam ullam corporis. Repellat aperiam,
distinctio maxime, dolorum illum labore recusandae. Sequi repellendus provident deserunt amet culpa, ratione dignissimos! Quibusdam delectus mollitia, ducimus. Error id architecto, ea molestias voluptate impedit inventore amet ducimus modi repellat
in. Asperiores soluta veritatis id eius, distinctio nisi voluptates voluptatibus iste iusto error officia tempore! Ducimus sed commodi quisquam provident iure voluptatum aliquam, nobis rem dolore, consectetur, dolor rerum eum nam adipisci, libero
beatae eaque aliquid sapiente? Eius, earum quas nostrum quasi reiciendis officia quaerat omnis. Cupiditate suscipit et tempora quibusdam perspiciatis eius cum, nisi facere animi. Delectus magnam inventore ipsum, veritatis reiciendis. Ipsum adipisci
recusandae, similique quas labore voluptas animi eaque velit, alias eveniet qui libero obcaecati suscipit, quam nihil quos placeat.</p>
</div>
</div>
From your code and to avoid extra wrapping , sticky on a side, height:0 on the other then overflow:auto on the parent can also do the job with flex:
example (you will easily understand it)
.flex {
display: flex;
/* demo purpose */
width: 500px;
border: solid;
overflow: auto;/* make the parent scroll */
gap:0.5em;
}
.flex .sibling-1 {
position: sticky;/* stick the reference for the height */
top: 0;
}
.flex .sibling-2 {
height: 0;/* give it no height to start from and let the parent show the scrollbar */
}
<div class="flex">
<div class="sibling-1">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
<div class="sibling-2">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
</div>
My simplified (to me at least) code snippet based on Lucent's answer:
main {
display: flex;
font-family: "nunito"
}
section1 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section2 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section1 > div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section1 class="scroll">
<div>I'm a div in section 1 ---
I have extra css rules of flex-basis 0px (making me as small as possible), flex 1 (making me fill up available space), and overflow y auto (making me scroll the extra content) --- My parent section 1 is a flex column --- My grandparent main is a flex row ---</div>
</section1>
<section2>
<div>I'm a div in section 2. --- My parent section 2 is a flex column --- My grandparent main is a flex row --- The height of the div in section 1 will adjust to my height.</div>
</section2>
</main>
Related
I have some text and an image floating to the right that looks like this :
The HTML looks like this :
<body>
<div id="container">
<div id="img"/>
<p>
What is Lorem Ipsum?..... etc
</p>
</div>
</body>
and the CSS that is placing the image looks like this :
#img {
background-image: url('http://www.w3.org/2008/site/images/logo-w3c-screen-lg');
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
height: 140px;
width: 250px;
float: right;
}
When I make the screen smaller I would like the image to scale as well. I dont want it squeezing the text on the left. If I make the screen smaller then this is what it looks like :
So I try and use percentages instead of absolute values.
Unfortunately if I use percentages in my CSS I get nothing. See below :
#img {
background-image: url('http://www.w3.org/2008/site/images/logo-w3c-screen-lg');
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
height: 30%;
min-height: 30%;
width: 30%;
min-width: 30%;
float: right;
}
How do I get my image to scale properly when I resize my browser?
playcode URL
If you set the height and width with percentages and the min values with pixels it works just fine.
height: 30%;
min-height: 300px;
width: 30%;
min-width: 150px;
Not sure if this is how you wanted it to be
playcode
I just updated your sample like this
html:
img {
float: right;
margin: 5px;
width: 40%;
min-width: 40%;
}
p {
text-align: justify;
font-size: 16px;
}
<div class="container">
<div>
<img src=
"http://www.w3.org/2008/site/images/logo-w3c-screen-lg"
alt="Longtail boat in Thailand">
</div>
<p>
Nunc pellentesque at sem ac sodales. Cras tellus ligula, pellentesque eget convallis nec, tincidunt et felis. Pellentesque nec magna pulvinar, rhoncus nisl nec, scelerisque ex. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nulla vel nisi volutpat, accumsan orci et, pulvinar nunc. Nulla mi nibh, finibus a sollicitudin vitae, tincidunt a lectus. Aenean facilisis tincidunt tempus. Etiam vel lobortis sapien. Aliquam tempor eros ut mauris ultricies, vel mollis erat scelerisque. Mauris sit amet congue nulla. In pretium nibh vel massa feugiat, sit amet interdum dui bibendum. Donec molestie eros sem, eu pellentesque lectus sodales non. Integer sit amet sollicitudin ex. Maecenas interdum sapien in turpis convallis consequat. Sed ac mattis dolor.Nunc pellentesque at sem ac sodales. Cras tellus ligula, pellentesque eget convallis nec, tincidunt et felis. Pellentesque nec magna pulvinar, rhoncus nisl nec, scelerisque ex. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nulla vel nisi volutpat, accumsan orci et, pulvinar nunc. Nulla mi nibh, finibus a sollicitudin vitae, tincidunt a lectus. Aenean facilisis tincidunt tempus. Etiam vel lobortis sapien. Aliquam tempor eros ut mauris ultricies, vel mollis erat scelerisque. Mauris sit amet congue nulla. In pretium nibh vel massa feugiat, sit amet interdum dui bibendum. Donec molestie eros sem, eu pellentesque lectus sodales non. Integer sit amet sollicitudin ex. Maecenas interdum sapien in turpis convallis consequat. Sed ac mattis dolor.
</p>
</div>
playcode
You could consider, making it a flex display on smaller devices, so that the text wraps after the image. Not sure, if this is what you're looking for, but it might improve user experience for smaller devices, otherwise the image may become too small to view and the text difficult to read.
Furthermore, this seems to be one of the valid use cases for the otherwise not outdated, but rather old fashioned layouts. I haven't seen floats recently. I suppose I tend to stay away from them.
Hope this helps.
img {
--smallest: 350px;
float: right;
margin: 5px;
width: min(var(--smallest), 40%);
}
p {
text-align: justify;
}
#media screen and (max-width: 700px) {
.container {
display: flex;
flex-flow: column;
}
img {
width: 70%;
}
}
<div class="container">
<img src="http://www.w3.org/2008/site/images/logo-w3c-screen-lg" alt="Longtail boat in Thailand">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. At explicabo quis officia animi culpa, dolorem, rem omnis possimus soluta dolorum delectus! Alias assumenda laboriosam hic! Dignissimos porro explicabo debitis blanditiis? Lorem ipsum dolor, sit
amet consectetur adipisicing elit. Eum quos dolorum ullam! Voluptas architecto quia, error possimus officia magni illo laudantium, voluptatibus harum tempora quas quisquam corporis aperiam ullam aut! Lorem ipsum dolor, sit amet consectetur adipisicing
elit. Culpa quibusdam rerum, iure ut ipsa soluta ipsam optio voluptatibus quis quasi facere neque, quam odio, eaque inventore vero est? Molestias, quia! Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laborum sapiente ex temporibus quasi
modi inventore corrupti molestiae, placeat culpa incidunt, repudiandae iste tempora maiores sit ab fuga sequi, laudantium commodi. Lorem ipsum dolor sit, amet consectetur adipisicing elit. Maxime beatae voluptatum iure quis odit itaque quaerat natus.
Labore incidunt minima exercitationem impedit ipsam, porro reprehenderit cupiditate illum deleniti dicta ea?
</p>
</div>
Thanks for everyones tips.
I found my own way of solving this by using viewport width and aspect ratio.
If I specify the width as always being a percentage of the screen width (vw) then the image will proportionally resize when making the screen smaller.
You need to define some kind of height as well, but if you use vh, or some other kind of height attribute then you get weird results. If you use aspect-ratio 2/1 or whatever the dimensions of the image are, then that takes care of height and preserves the ratio.
#img {
background-image: url('http://www.w3.org/2008/site/images/logo-w3c-screen-lg');
background-size: 100%;
background-repeat: no-repeat;
background-position: top;
min-width: 30vw;
aspect-ratio: 2 / 1;
}
https://playcode.io/1141029
I have two sibling elements which each contain dynamic content.
<div class="flex">
<div class="sibling-1"></div>
<div class="sibling-2"></div>
</div>
In some cases sibling-1 will have more content then sibling-2 and vice versa.
I would like the height of the second element sibling-2 always equal the height of the first sibling-1. If the height of sibling-2 is greater then the height of sibling-1 it will overflow the flex div and thus be scrollable.
Is there any way to accomplish this with Flexbox?
Yes, it is possible. Leave the sibling setting the max height alone and set the others' flex-basis: 0 and flex-grow: 1, which according to the spec will expand them to their sibling's height. No absolute positioning. No setting height on any elements.
main {
display: flex;
}
section {
display: flex;
flex-direction: column;
width: 7em;
border: thin solid black;
margin: 1em;
}
:not(.limiter)>div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section>
<div>I'm longer and will scroll my overflow. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text
in flow text in flow text in flow text in flow text in flow text in flow text in</div>
</section>
<section class="limiter">
<div>Every parent's siblings match my height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
<section>
<div>I'm shorter but still match the height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
</main>
Is there any way to accomplish this with Flexbox?
Basically, no. The flex equal heights feature is based on the height of the container, not any particular sibling.
So sibling-1 and sibling-2 can always be equal height.
But flexbox has no built-in mechanism to limit the height of items to the height of one sibling.
Consider JavaScript or CSS positioning properties.
Here's an example using absolute positioning:
.flex {
display: flex;
width: 200px;
position: relative;
}
.flex>div {
flex: 0 0 50%;
border: 1px solid black;
box-sizing: border-box;
}
.sibling-2 {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
right: 0;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">text<br>text<br>text<br>text<br>text<br>text<br></div>
<div class="sibling-2">text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br></div>
</div>
jsFiddle
Yes you can accomplish this by making siblings 1 and 2 also flex containers, then on sibling-2 make an absolute div (also flex container) inside that will be the parent of your scroller
<div class="sibling-1 flex sibling"></div>
<div class="sibling-2 flex sibling">
<div class="absolute flex scroller-wrap">
<div class="relative vertical-scroller">
your content here
</div>
</div>
</div>
css:
.relative{
position:relative;
}
.absolute{
position:absolute;
}
.flex{
display:flex;
}
.sibling-2{
flex:1;
}
.scroller-wrap{
height:100%;
}
on sibling 2 just set a minimum height on pixels - useful on responsive cases if siblings 1 and 2 stack each other on mobile
As I mentioned in the comments and has been continued in other answers, there is no flexbox method.
It is possible using position:absolute on the second sibling though...but since that's not actually a flexbox solution, this is here for information only.
.flex {
margin: 1rem auto;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
* {
margin: 0;
outline: 0;
}
.flex {
width: 80%;
margin: 1rem auto;
border: 1px solid grey;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore quia, voluptatum! Perspiciatis praesentium nemo, labore mollitia numquam recusandae voluptatem consectetur amet deleniti cum nesciunt blanditiis, esse quis doloremque vero! Reiciendis
porro impedit perspiciatis. Amet in praesentium molestias ipsum ad quis quia doloribus, veniam unde, ea ducimus rerum porro tenetur voluptatem, a laudantium. Accusantium provident voluptatibus perferendis hic blanditiis laborum amet consequatur
esse, fugiat doloremque consectetur ullam sequi, ratione perspiciatis, voluptatem eaque vitae rem repellendus in architecto vel nulla animi neque. Accusantium animi voluptatum, suscipit possimus,</p>
</div>
<div class="sibling-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque modi quibusdam aliquam officia illo itaque ratione, iste architecto ad blanditiis fugiat sequi laborum cupiditate voluptatum, autem non? Quibusdam ad eius hic rem id. Libero, tempora
dicta reiciendis placeat nihil quia fuga iste aliquid quo minus labore sapiente fugit, similique non aliquam, beatae pariatur nobis fugiat! Ipsam nobis fugit maxime aliquam accusamus explicabo nostrum ab nemo adipisci dolorem qui porro ea pariatur
corporis aut reiciendis optio, sint eum nam suscipit itaque aspernatur recusandae. Cumque qui quod doloremque. Ut voluptates, asperiores, laborum excepturi quam odit, quos rerum assumenda sapiente saepe nisi? Numquam placeat repellat eum dolorem
reprehenderit dolores culpa id explicabo consequuntur. Quas nobis veritatis tempora animi similique earum commodi, laborum blanditiis dolor illo, eaque accusamus aliquid nam a ex, velit, maiores natus. Id totam ullam corporis. Repellat aperiam,
distinctio maxime, dolorum illum labore recusandae. Sequi repellendus provident deserunt amet culpa, ratione dignissimos! Quibusdam delectus mollitia, ducimus. Error id architecto, ea molestias voluptate impedit inventore amet ducimus modi repellat
in. Asperiores soluta veritatis id eius, distinctio nisi voluptates voluptatibus iste iusto error officia tempore! Ducimus sed commodi quisquam provident iure voluptatum aliquam, nobis rem dolore, consectetur, dolor rerum eum nam adipisci, libero
beatae eaque aliquid sapiente? Eius, earum quas nostrum quasi reiciendis officia quaerat omnis. Cupiditate suscipit et tempora quibusdam perspiciatis eius cum, nisi facere animi. Delectus magnam inventore ipsum, veritatis reiciendis. Ipsum adipisci
recusandae, similique quas labore voluptas animi eaque velit, alias eveniet qui libero obcaecati suscipit, quam nihil quos placeat.</p>
</div>
</div>
From your code and to avoid extra wrapping , sticky on a side, height:0 on the other then overflow:auto on the parent can also do the job with flex:
example (you will easily understand it)
.flex {
display: flex;
/* demo purpose */
width: 500px;
border: solid;
overflow: auto;/* make the parent scroll */
gap:0.5em;
}
.flex .sibling-1 {
position: sticky;/* stick the reference for the height */
top: 0;
}
.flex .sibling-2 {
height: 0;/* give it no height to start from and let the parent show the scrollbar */
}
<div class="flex">
<div class="sibling-1">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
<div class="sibling-2">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
</div>
My simplified (to me at least) code snippet based on Lucent's answer:
main {
display: flex;
font-family: "nunito"
}
section1 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section2 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section1 > div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section1 class="scroll">
<div>I'm a div in section 1 ---
I have extra css rules of flex-basis 0px (making me as small as possible), flex 1 (making me fill up available space), and overflow y auto (making me scroll the extra content) --- My parent section 1 is a flex column --- My grandparent main is a flex row ---</div>
</section1>
<section2>
<div>I'm a div in section 2. --- My parent section 2 is a flex column --- My grandparent main is a flex row --- The height of the div in section 1 will adjust to my height.</div>
</section2>
</main>
I have been trying to solve this problem for hours but just can't
.container {
position: absolute;
top: 50%;
background-color: white;
}
.text1 {
float: left;
z-index: 0;
color: black;
}
#face1 {
z-index: 0;
float: right;
top: 10px;
}
<div class="container">
<h1 class="text1">Povjerenje</h1>
<p class="text1" align=l eft>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget facilisis justo. Etiam non gravida leo. Integer venenatis massa massa, ultrices ornare ex molestie sit amet. Nulla imperdiet dignissim metus sit amet imperdiet. Etiam fermentum scelerisque
commodo. Integer porta euismod nisl sit amet tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas vulputate aliquet orci sed scelerisque. Integer vulputate et dolor at hendrerit. Maecenas aliquam
elit tellus, sed condimentum felis dictum eget. Sed justo tellus, pulvinar vel egestas ac, scelerisque ut nulla. Nam aliquam ligula quis eros eleifend tempus. Pellentesque rhoncus efficitur elit eget sagittis.ntesque rhoncus efficitur elit eget
</p>
<img id="face1" src="http://placekitten.com/100/100">
</div>
I have a div container holding an image and text and I wan't to make texrt wrap around the image but it always go below or above the image. What I want to do is automatic wraping of text over the image so I can move it and text will automatically move coresponding to it.
Any ideas on how to fix it?
Thanks
Put the image inside the paragraph.
.container {
background-color: white;
}
.text1 {
color: black;
}
#face1 {
float: right;
}
<div class="container">
<h1 class="text1">Povjerenje</h1>
<p class="text1" align=l eft><img id="face1" src="http://placekitten.com/100/100">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eget facilisis justo. Etiam non gravida leo. Integer venenatis massa massa, ultrices ornare ex molestie sit amet. Nulla imperdiet dignissim metus sit amet imperdiet. Etiam fermentum scelerisque
commodo. Integer porta euismod nisl sit amet tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Maecenas vulputate aliquet orci sed scelerisque. Integer vulputate et dolor at hendrerit. Maecenas aliquam
elit tellus, sed condimentum felis dictum eget. Sed justo tellus, pulvinar vel egestas ac, scelerisque ut nulla. Nam aliquam ligula quis eros eleifend tempus. Pellentesque rhoncus efficitur elit eget sagittis.ntesque rhoncus efficitur elit eget
</p>
</div>
use css float: right; / float: left;
image must be before the text
no need to be part of <div> with text
img {
float: right;
margin-left: 10px;
}
p {
margin-top: 0;
}
<img src="http://placehold.it/100x100" alt="" />
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi cum doloremque eum impedit, libero modi, natus nulla omnis quaerat sapiente sed suscipit vel? Aliquid corporis cupiditate, dolore dolorem eius facilis hic illo iste libero magni maiores maxime, necessitatibus, odit officiis optio perferendis placeat porro praesentium recusandae repudiandae suscipit tempore totam ullam vel veritatis vitae voluptate voluptatibus? Accusantium aperiam, cum dignissimos dolore est et hic impedit, magnam numquam obcaecati provident quisquam saepe? Amet enim est explicabo impedit in modi nobis perferendis provident totam! Ab, accusantium aliquam aut autem consequatur cupiditate, deleniti dignissimos distinctio dolor ea eveniet excepturi facilis harum id impedit iure iusto laboriosam modi molestiae nam necessitatibus nihil nobis omnis perspiciatis quaerat reiciendis rem repellat rerum sapiente tempore, unde velit vitae voluptates. Ab alias culpa cupiditate dolor dolorem ea esse et eum eveniet ex illo laboriosam natus qui quibusdam quos, recusandae voluptate! Accusamus adipisci alias animi asperiores distinctio dolorem dolorum ducimus ea earum enim eum facilis illo inventore labore maxime molestias nam neque nulla obcaecati, quod quos ratione recusandae soluta sunt ullam ut vero! Esse libero perspiciatis qui saepe sed veniam. A consectetur culpa deleniti doloremque doloribus nobis quaerat quidem quo saepe. Aut error nemo nostrum numquam quae ratione veritatis?</p>
</div>
I have two sibling elements which each contain dynamic content.
<div class="flex">
<div class="sibling-1"></div>
<div class="sibling-2"></div>
</div>
In some cases sibling-1 will have more content then sibling-2 and vice versa.
I would like the height of the second element sibling-2 always equal the height of the first sibling-1. If the height of sibling-2 is greater then the height of sibling-1 it will overflow the flex div and thus be scrollable.
Is there any way to accomplish this with Flexbox?
Yes, it is possible. Leave the sibling setting the max height alone and set the others' flex-basis: 0 and flex-grow: 1, which according to the spec will expand them to their sibling's height. No absolute positioning. No setting height on any elements.
main {
display: flex;
}
section {
display: flex;
flex-direction: column;
width: 7em;
border: thin solid black;
margin: 1em;
}
:not(.limiter)>div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section>
<div>I'm longer and will scroll my overflow. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text
in flow text in flow text in flow text in flow text in flow text in flow text in</div>
</section>
<section class="limiter">
<div>Every parent's siblings match my height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
<section>
<div>I'm shorter but still match the height. in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text in flow text</div>
</section>
</main>
Is there any way to accomplish this with Flexbox?
Basically, no. The flex equal heights feature is based on the height of the container, not any particular sibling.
So sibling-1 and sibling-2 can always be equal height.
But flexbox has no built-in mechanism to limit the height of items to the height of one sibling.
Consider JavaScript or CSS positioning properties.
Here's an example using absolute positioning:
.flex {
display: flex;
width: 200px;
position: relative;
}
.flex>div {
flex: 0 0 50%;
border: 1px solid black;
box-sizing: border-box;
}
.sibling-2 {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
right: 0;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">text<br>text<br>text<br>text<br>text<br>text<br></div>
<div class="sibling-2">text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br>text<br></div>
</div>
jsFiddle
Yes you can accomplish this by making siblings 1 and 2 also flex containers, then on sibling-2 make an absolute div (also flex container) inside that will be the parent of your scroller
<div class="sibling-1 flex sibling"></div>
<div class="sibling-2 flex sibling">
<div class="absolute flex scroller-wrap">
<div class="relative vertical-scroller">
your content here
</div>
</div>
</div>
css:
.relative{
position:relative;
}
.absolute{
position:absolute;
}
.flex{
display:flex;
}
.sibling-2{
flex:1;
}
.scroller-wrap{
height:100%;
}
on sibling 2 just set a minimum height on pixels - useful on responsive cases if siblings 1 and 2 stack each other on mobile
As I mentioned in the comments and has been continued in other answers, there is no flexbox method.
It is possible using position:absolute on the second sibling though...but since that's not actually a flexbox solution, this is here for information only.
.flex {
margin: 1rem auto;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
* {
margin: 0;
outline: 0;
}
.flex {
width: 80%;
margin: 1rem auto;
border: 1px solid grey;
position: relative;
display: flex;
}
.sibling-1 {
flex: 0 0 50%;
}
.sibling-2 {
position: absolute;
right: 0;
width: 50%;
height: 100%;
overflow: auto;
}
<div class="flex">
<div class="sibling-1">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore quia, voluptatum! Perspiciatis praesentium nemo, labore mollitia numquam recusandae voluptatem consectetur amet deleniti cum nesciunt blanditiis, esse quis doloremque vero! Reiciendis
porro impedit perspiciatis. Amet in praesentium molestias ipsum ad quis quia doloribus, veniam unde, ea ducimus rerum porro tenetur voluptatem, a laudantium. Accusantium provident voluptatibus perferendis hic blanditiis laborum amet consequatur
esse, fugiat doloremque consectetur ullam sequi, ratione perspiciatis, voluptatem eaque vitae rem repellendus in architecto vel nulla animi neque. Accusantium animi voluptatum, suscipit possimus,</p>
</div>
<div class="sibling-2">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque modi quibusdam aliquam officia illo itaque ratione, iste architecto ad blanditiis fugiat sequi laborum cupiditate voluptatum, autem non? Quibusdam ad eius hic rem id. Libero, tempora
dicta reiciendis placeat nihil quia fuga iste aliquid quo minus labore sapiente fugit, similique non aliquam, beatae pariatur nobis fugiat! Ipsam nobis fugit maxime aliquam accusamus explicabo nostrum ab nemo adipisci dolorem qui porro ea pariatur
corporis aut reiciendis optio, sint eum nam suscipit itaque aspernatur recusandae. Cumque qui quod doloremque. Ut voluptates, asperiores, laborum excepturi quam odit, quos rerum assumenda sapiente saepe nisi? Numquam placeat repellat eum dolorem
reprehenderit dolores culpa id explicabo consequuntur. Quas nobis veritatis tempora animi similique earum commodi, laborum blanditiis dolor illo, eaque accusamus aliquid nam a ex, velit, maiores natus. Id totam ullam corporis. Repellat aperiam,
distinctio maxime, dolorum illum labore recusandae. Sequi repellendus provident deserunt amet culpa, ratione dignissimos! Quibusdam delectus mollitia, ducimus. Error id architecto, ea molestias voluptate impedit inventore amet ducimus modi repellat
in. Asperiores soluta veritatis id eius, distinctio nisi voluptates voluptatibus iste iusto error officia tempore! Ducimus sed commodi quisquam provident iure voluptatum aliquam, nobis rem dolore, consectetur, dolor rerum eum nam adipisci, libero
beatae eaque aliquid sapiente? Eius, earum quas nostrum quasi reiciendis officia quaerat omnis. Cupiditate suscipit et tempora quibusdam perspiciatis eius cum, nisi facere animi. Delectus magnam inventore ipsum, veritatis reiciendis. Ipsum adipisci
recusandae, similique quas labore voluptas animi eaque velit, alias eveniet qui libero obcaecati suscipit, quam nihil quos placeat.</p>
</div>
</div>
From your code and to avoid extra wrapping , sticky on a side, height:0 on the other then overflow:auto on the parent can also do the job with flex:
example (you will easily understand it)
.flex {
display: flex;
/* demo purpose */
width: 500px;
border: solid;
overflow: auto;/* make the parent scroll */
gap:0.5em;
}
.flex .sibling-1 {
position: sticky;/* stick the reference for the height */
top: 0;
}
.flex .sibling-2 {
height: 0;/* give it no height to start from and let the parent show the scrollbar */
}
<div class="flex">
<div class="sibling-1">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
<div class="sibling-2">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
</div>
My simplified (to me at least) code snippet based on Lucent's answer:
main {
display: flex;
font-family: "nunito"
}
section1 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section2 {
display: flex;
flex-direction: column;
width: 15rem;
border: thin solid gray;
}
section1 > div {
flex-basis: 0px;
flex-grow: 1;
overflow-y: auto;
}
<main>
<section1 class="scroll">
<div>I'm a div in section 1 ---
I have extra css rules of flex-basis 0px (making me as small as possible), flex 1 (making me fill up available space), and overflow y auto (making me scroll the extra content) --- My parent section 1 is a flex column --- My grandparent main is a flex row ---</div>
</section1>
<section2>
<div>I'm a div in section 2. --- My parent section 2 is a flex column --- My grandparent main is a flex row --- The height of the div in section 1 will adjust to my height.</div>
</section2>
</main>
I'm trying to layer some divs using relative/absolute positioning. The problem I can't seem to fix is the div below the wrapper div.
Check out this jsfiddle to see what I mean.
Notice the position of the div.more-stuff. I would like that div to display underneath div#wrap.
#wrap {
position: relative;
width: 100%;
}
.node-content {
position: absolute;
top: 30%;
left: 5%;
width: 80%;
background: rgba(236, 240, 241, 1.0);
padding: 5%;
}
.bg-img img {
width: 100%;
height: 300px;
background: rgba(192, 57, 43, 1.0);
}
.more-stuff {
}
I just did little bit changes in CSS as you can see in the code below and the fiddle is :
FIDDLE
CSS
body {
background: rgba(46, 204, 113, 1.0)
}
#main-container {
width: 50%;
margin: 0 auto;
}
#wrap {
position: relative;
width: 100%;
}
.node-content {
position: relative;
top: 0%;
left: 5%;
width: 80%;
background: rgba(236, 240, 241, 1.0);
padding: 5%;
}
.bg-img img {
position:absolute;
width: 100%;
}
.more-stuff{
position: relative;
width: 100%;
background: rgba(192, 57, 43, 1.0);
margin: 0 auto;
}
is this what you need something ??
.more-stuff {
position: absolute;
top: 0;
z-index: -1;
}
https://jsfiddle.net/ymdahi/3qypLpsd/embedded/result/
It seems that the problem was trying to use the relative/absolute positioning in concert to float one div above the other. This seems to be the wrong way - the right way I found on Smashing Mag:
Add position: relative; to the div that I want to position over the cover image div did the trick. Check out the final JSFiddle.
Here's the code snippet to run as well:
body { background: rgba(46, 204, 113,1.0) }
#main-container { width: 80%; max-width: 1200px; margin: 0 auto; }
.cover-photo { max-height: 520px; overflow: hidden; }
.cover-photo img { width: 100%; height: auto; background: rgba(192, 57, 43,1.0); }
.content-region {
position: relative; /* add position: relative to floating region, but do not add position: absolute to wrapping div. */
width: 80%;
padding: 25px;
margin: -215px auto 25px;
background: rgba(236, 240, 241,1.0);
}
.left-col { float: left; width: 30%; }
.right-col { float: right; width: 69%; }
.below-content { padding: 50px; background: #000; color: #fff; }
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
<div id="main-container">
<div class="cover-photo">
<img src="http://static.pexels.com/wp-content/uploads/2014/05/iphone-macbook-air-man-156-825x550.jpg">
</div>
<div class="content-region clearfix">
<div class="left-col">
<h1>The title of the page</h1>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis.</p>
<h2>The title of the page</h2>
<p>Doloremque! Phasellus faucibus! Repellat iure eleifend ullam neque debitis culpa, condimentum et aute voluptatibus odio eiusmod similique tempora facere doloribus itaque. Dictumst neque interdum. Nonummy</p>
</div><!-- left-col -->
<div class="right-col">
<h1>Main content column</h1>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis. Lacinia erat condimentum proin hymenaeos quisque? Voluptatibus varius, minima, dolorem! Quasi, class? Rhoncus proin porro hymenaeos hymenaeos commodi sociis repudiandae vel unde voluptates similique voluptatum natus, pariatur non pretium nascetur eaque, fames elementum similique rem voluptate, laboriosam corrupti atque doloribus impedit pulvinar neque nibh dictumst ab! Iusto, proin voluptatibus doloremque, molestie cubilia eaque officiis tincidunt hac cubilia explicabo architecto dignissim officiis, sapien, maiores tristique. Nesciunt, arcu.</p>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis. Lacinia erat condimentum proin hymenaeos quisque? Voluptatibus varius, minima, dolorem! Quasi, class? Rhoncus proin porro hymenaeos hymenaeos commodi sociis repudiandae vel unde voluptates similique voluptatum natus, pariatur non pretium nascetur eaque, fames elementum similique rem voluptate, laboriosam corrupti atque doloribus impedit pulvinar neque nibh dictumst ab! Iusto, proin voluptatibus doloremque, molestie cubilia eaque officiis tincidunt hac cubilia explicabo architecto dignissim officiis, sapien, maiores tristique. Nesciunt, arcu.</p>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis. Lacinia erat condimentum proin hymenaeos quisque? Voluptatibus varius, minima, dolorem! Quasi, class? Rhoncus proin porro hymenaeos hymenaeos commodi sociis repudiandae vel unde voluptates similique voluptatum natus, pariatur non pretium nascetur eaque, fames elementum similique rem voluptate, laboriosam corrupti atque doloribus impedit pulvinar neque nibh dictumst ab! Iusto, proin voluptatibus doloremque, molestie cubilia eaque officiis tincidunt hac cubilia explicabo architecto dignissim officiis, sapien, maiores tristique. Nesciunt, arcu.</p>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis. Lacinia erat condimentum proin hymenaeos quisque? Voluptatibus varius, minima, dolorem! Quasi, class? Rhoncus proin porro hymenaeos hymenaeos commodi sociis repudiandae vel unde voluptates similique voluptatum natus, pariatur non pretium nascetur eaque, fames elementum similique rem voluptate, laboriosam corrupti atque doloribus impedit pulvinar neque nibh dictumst ab! Iusto, proin voluptatibus doloremque, molestie cubilia eaque officiis tincidunt hac cubilia explicabo architecto dignissim officiis, sapien, maiores tristique. Nesciunt, arcu.</p>
</div><!-- right-col -->
</div> <!-- content-region -->
<div class="below-content">
<h1>Other things below content</h1>
<p>Porttitor eros nesciunt, fugiat? Cupidatat, enim eligendi! Tempor commodi risus facilisi conubia? Pulvinar deleniti etiam nostrud cras magni bibendum hendrerit dictumst imperdiet blandit possimus porttitor eiusmod lorem feugiat dolor cillum! Ratione mattis, maecenas! Perspiciatis. Lacinia erat condimentum proin hymenaeos quisque? Voluptatibus varius, minima, dolorem! Quasi, class? Rhoncus proin porro hymenaeos hymenaeos commodi sociis repudiandae vel unde voluptates similique voluptatum natus, pariatur non pretium nascetur eaque, fames elementum similique rem voluptate, laboriosam corrupti atque doloribus impedit pulvinar neque nibh dictumst ab! Iusto, proin voluptatibus doloremque, molestie cubilia eaque officiis tincidunt hac cubilia explicabo architecto dignissim officiis, sapien, maiores tristique. Nesciunt, arcu.</p>
</div><!-- below-content -->
</div><!-- #main-container -->