Bootstrap carousel indicator position - html

I have bootstrap carousel with text slider, i have problem with indicators ,because if text large or small, my indicators dont have fixed position.
I tried to set limited height for carousel class and thats work only for caomputers, but not responsive on mobile devices, and i deleted height.
http://codepen.io/anon/pen/MwGLJd
HTML
<div class="about mainContainer">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<h2 class="fontraleway">WHO WE ARE?</h2>
<div id="locations" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#locations" data-slide-to="0" class="active"></li>
<li data-target="#locations" data-slide-to="1"></li>
<li data-target="#locations" data-slide-to="2"></li>
<li data-target="#locations" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<center>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fermentum nulla augue, in ultrices risus rutrum a. Suspendisse sed porttitor tellus. Ut vitae vulputate sapien, a facilisis quam.
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
<div class="item">
<center>
Sed eget luctus leo, eu sagittis felis. Vestibulum et tellus sed neque gravida pretium vel pellentesque tellus. Nullam in dolor magna. Donec in mauris eget nisl volutpat ornare a ut dolor. Vestibulum sit amet felis et purus sagittis interdum. Quisque quis nisi neque. In viverra lobortis ex in auctor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut at nulla augue. Duis et congue erat. Maecenas odio justo, finibus at nulla at, luctus elementum eros. Quisque eget nisl felis. Phasellus tempus imperdiet dui condimentum bibendum. Sed a turpis quis diam ullamcorper interdum in at lectus
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
</div>
</div>
</div>
</div><!--Closed div row-->
</div><!--Closed div about-->
CSS
.services h2{
margin-top: 97px;
}
.carousel-indicators li{
background-color: transparent;
border:2px solid #dbdbdb;
}
.carousel-indicators .active{
background-color: #3eb8df;
border:2px solid #3eb8df;
}
.carousel-indicators{
bottom:-60px !important;
}
.carousel-indicators li{
width:15px !important;
height:15px !important;
}

Just set a min-height on the carousel-inner element that will make the indicators stay at the same position.
The easiest way to do that would be to add it into your CSS like so:
.carousel-inner {
min-height: 120px;
}
But the problem with this is, whenever the size of the window changes, the size of the items inside of carousel-inner will change as well and their height might exceed the 120px.
So much better would be to get the item with the biggest height and then add the min-height property dynamically. Here is an example:
$(function () {
// Reference your carousel-inner and the items.
var $carouselnner = $(".carousel-inner"),
$carouselItems = $carouselnner.find('.item');
// Handle window resize.
function resizeHandler() {
// Map over all items to get their height and assign it to minHeight.
var minHeight = $carouselItems.map(function () {
return $(this).height();
}).get();
// Now let's apply the biggest height as the value of min-height on carousel-inner.
$carouselnner.css('min-height', Math.max.apply(null, minHeight) + 10 + 'px');
}
// Add a listener to window resize and trigger it immediately.
$(window).resize(resizeHandler).trigger('resize');
});
.services h2 {
margin-top: 97px;
}
.carousel-indicators li {
background-color: transparent;
border: 2px solid #dbdbdb !important;
}
.carousel-indicators .active {
background-color: #3eb8df !important;
border: 2px solid #3eb8df !important;
}
.carousel-indicators {
bottom: -60px !important;
}
.carousel-indicators li {
width: 15px !important;
height: 15px !important;
}
.carousel-inner {
min-height: 120px;
}
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="about mainContainer">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<h2 class="fontraleway">WHO WE ARE?</h2>
<div id="locations" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#locations" data-slide-to="0" class="active"></li>
<li data-target="#locations" data-slide-to="1"></li>
<li data-target="#locations" data-slide-to="2"></li>
<li data-target="#locations" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<center>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fermentum nulla augue, in ultrices risus rutrum a. Suspendisse sed porttitor tellus. Ut vitae vulputate sapien, a facilisis quam.
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
<div class="item">
<center>
Sed eget luctus leo, eu sagittis felis. Vestibulum et tellus sed neque gravida pretium vel pellentesque tellus. Nullam in dolor magna. Donec in mauris eget nisl volutpat ornare a ut dolor. Vestibulum sit amet felis et purus sagittis interdum. Quisque quis nisi neque. In viverra lobortis ex in auctor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut at nulla augue. Duis et congue erat. Maecenas odio justo, finibus at nulla at, luctus elementum eros. Quisque eget nisl felis. Phasellus tempus imperdiet dui condimentum bibendum. Sed a turpis quis diam ullamcorper interdum in at lectus
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
</div>
</div>
</div>
</div><!--Closed div row-->
</div><!--Closed div about-->

Related

positioning elements in a certain place

I've been learning HTML and CSS for a little while now but I am pretty self taught so sorry if this seems to be a pretty basic question.
I have this container in the middle of my page (it's a carousel but I don't think that makes a difference) and I'm trying to position two things: a large word on top of it (inside a div) and navigation buttons below it. Currently, I've positioned them both there using position: fixed; and top and left elements. This isn't ideal of course because on mobile and devices of different widths these elements are in completely different positions.
Here's the HTML for the container and navigation buttons, the carousel controls are there too:
<div id="container">
<input hidden type="radio" name="carousel-control" id="button_a" checked/>
<input hidden type="radio" name="carousel-control" id="button_b"/>
<input hidden type="radio" name="carousel-control" id="button_c"/>
<input hidden type="radio" name="carousel-control" id="button_d"/>
<div id="title">explore</div> /*the text I want on top*/
<div id="carousel">
<div class="p-wrapper">
<section class="panel_a">
<h2>Panel a</h2>
<div class="headerdivider"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ornare faucibus diam id maximus. Fusce at efficitur nunc. Curabitur sed ullamcorper orci. Nam nulla enim, ultricies nec lectus a, commodo volutpat nisi. Pellentesque facilisis lacinia ante, eu pulvinar ante varius a. Fusce tincidunt efficitur tempor. Praesent pretium felis consectetur posuere sagittis. Sed luctus nisl non vestibulum semper. Vivamus mi velit, porttitor ac malesuada at, vulputate venenatis augue.</p>
<p>Morbi faucibus, nisi ac vulputate mattis, turpis tortor maximus nibh, nec interdum lectus sem sit amet enim. Integer non nulla vitae ex gravida egestas. Fusce sodales neque ut erat tempor euismod. Quisque imperdiet rhoncus pellentesque. Fusce vitae efficitur dolor, nec laoreet lacus. Nulla orci purus, cursus sit amet posuere ac, ultrices sed dui. Ut bibendum, dui non euismod lobortis, mi neque pretium lacus, in pulvinar libero mauris eu sem. Morbi ut felis finibus, posuere risus sit amet, malesuada leo.</p>
<p>Nulla quis molestie mi. Cras quis magna dolor. Suspendisse a scelerisque ligula, ullamcorper imperdiet justo. Ut sit amet nisl malesuada, varius turpis quis, convallis urna. Vestibulum sed odio eget lorem porta dapibus. Mauris augue sapien, scelerisque vel neque vitae, vulputate iaculis tellus. Sed accumsan egestas sem congue vehicula. Fusce quis blandit nibh, non bibendum lorem. Integer maximus mi non eros tincidunt pretium. Curabitur tempor nisi a aliquet dictum. Sed pellentesque venenatis ex ac fermentum. Aliquam vitae tincidunt urna.</p>
<p>Nulla sagittis quis purus vitae consequat. Nullam pharetra dignissim tempus. Pellentesque egestas elit vel arcu condimentum euismod ut eu nisi. Fusce erat lectus, placerat quis egestas posuere, sollicitudin non ligula. Suspendisse potenti. Fusce vel leo ultrices, vehicula leo quis, semper quam. Cras mollis quis sem in tempor. Proin sed dui eu arcu efficitur pulvinar at sed leo. Donec rhoncus rhoncus est, eleifend posuere neque aliquet in.</p>
</section>
<section class="panel_b">
<h2>Panel b</h2>
<div class="headerdivider"></div>
{block:AskEnabled}
<p><iframe frameborder="0" scrolling="no" width="100%" height="190" src="http://www.tumblr.com/ask_form/spinningsilvers.tumblr.com" style="background-color:transparent; overflow:hidden;" id="ask_form"></iframe><!--[if IE]><script type="text/javascript">document.getElementById('ask_form').allowTransparency=true;</script><![endif]--></p>{/block:AskEnabled}
</section>
<section class="panel_c">
<h2>Panel c</h2>
<div class="headerdivider"></div>
<p>Fusce convallis arcu mauris, vitae semper ligula maximus vitae. Morbi a nibh id justo ullamcorper tincidunt. Aliquam et mollis mauris, eu varius metus. Praesent eget mi ac diam congue iaculis. Praesent accumsan euismod tempus. Aenean tempor libero et eros pellentesque molestie. Pellentesque malesuada ligula ut hendrerit laoreet. Ut turpis neque, tempor in ultrices sed, hendrerit ac leo. Nam placerat dolor sit amet ligula bibendum malesuada. Donec sagittis ultricies ex id mattis.</p>
<ul>
<li>Aliquam iaculis enim ut mi bibendum tincidunt.</li>
<li>Nulla quis elit in lorem vulputate laoreet.</li>
<li>Praesent non lacus euismod, ultricies lectus ac, vehicula arcu.</li>
<li>Integer lobortis ipsum vitae velit mollis, at commodo ligula suscipit.</li>
</ul>
<p>Sed ut leo et mi tristique feugiat. Nunc fermentum diam mauris, in ultricies neque tincidunt dictum. Quisque ac odio dignissim, ornare enim condimentum, faucibus erat. Sed tortor turpis, imperdiet dignissim lacus eget, dignissim vehicula lorem. Mauris semper mi lacus, sit amet rutrum lacus tincidunt sed. Curabitur vel nisl eu magna placerat pretium. Curabitur malesuada sagittis tortor, eget volutpat mi pellentesque quis.</p>
</section>
<section class="panel_d">
<h2>Panel d</h2>
<div class="headerdivider"></div>
<p>Aenean maximus accumsan mauris. Praesent rutrum vitae purus et mattis. Nunc at mi et diam pulvinar euismod. Curabitur interdum, leo quis tincidunt pharetra, risus nisl mollis velit, interdum consectetur justo orci in nisi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus elit turpis, tincidunt non dui et, molestie maximus nisl. Duis pretium eros sed ultricies convallis. Pellentesque vitae tempor lorem, eu laoreet metus. Vivamus sit amet lorem libero. Vestibulum tristique ligula in gravida volutpat. Sed facilisis ipsum velit, et pharetra nisi ullamcorper ut. Maecenas purus dui, tincidunt non ipsum vel, bibendum aliquam elit. Cras rutrum velit diam, semper aliquet libero posuere nec.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec ut eleifend lacus. Sed fringilla ullamcorper justo, porttitor cursus nisl. Sed et mi aliquet, rutrum erat at, porttitor felis. Mauris consequat mauris id posuere dictum. Proin nec congue purus, nec rhoncus justo. Cras sit amet neque eu ex feugiat auctor at dignissim augue. Sed commodo tellus id erat lobortis, sit amet elementum felis commodo. Ut massa diam, tristique vel lacinia sed, vulputate eget mauris. Fusce lacinia bibendum iaculis.</p>
</section>
</div> <!-- // .p-wrapper -->
</div> <!-- // #carousel -->
<div id="navigation"> /*the nav buttons that will go below*/
<label for="button_a" class="label_a"> <span>about</span> </label>
<label for="button_b" class="label_b"> <span>message</span> </label>
<label for="button_c" class="label_c"> <span>navigate</span> </label>
<label for="button_d" class="label_d"> <span>social</span> </label>
</div> <!-- // #navigation -->
Here's the CSS for the word I'm trying to put above:
#title {
font-family:'Abril Fatface', cursive;
font-size:40px;
position:fixed;
top:140px;
left:135px;
}
Here's the CSS for the navigation that I'm trying to put below:
#navigation {
position:fixed;
bottom:175px;
justify-content:center;
}
Here's a picture of
what I'm looking to get just with better code of course.
I've tried position: absolute; paired with top: 0px; and left: 0px and I tried putting the div for the words to go above in various spots but nothing's working. (Not sure this makes a difference but I'm working with Tumblr code here.) This is my first time posting here and as I mentioned I'm not too too advanced with coding. Thanks!
You could wrap everything that belongs together actually together, meaning inside a wrapper-element. That way, you can simply use display: flex with flex-flow: column on their parent to lay them out in a column.
Then, with the align-items-property, you can say how/where they should align.
For the navigation I have overridden it with align-self: stretch so that I can center its content.
However, one could have also given the parent align-items: stretch (which is default), and the title align-self: flex-start. Both will give the expected result as long as .carousel is the widest element of the three.
As you see, by using a wrapper-element, you don't need to fiddle around with numbers to position them, and as a bonus, you group them together making it actually semantically clear that they belong together.
body {
display: flex;
}
section {
display: flex;
flex-flow: column;
align-items: flex-start;
}
section > .carousel {
border: 1px solid black;
width: 400px;
height: 300px;
}
section > nav {
align-self: stretch;
display: flex;
justify-content: center;
gap: 0.8rem;
}
<section>
<h1>explore</h1>
<div class="carousel"></div>
<nav>
<a>Some link</a>
<a>Another link</a>
<a>A third link</a>
</nav>
</section>

max height on every screen size - bootstrap

I want to have a fullscreen page without global scrolling. The background color should be always be 100% height of the screen.
If the content of a column is too big (like the green column in the screenshots), the column itself should have a vertical scrollbar.
Not scrolled:
Scrolled:
My HTML code:
<div class="container-fluit">
<div class="row">
<div class="col-lg-12">
</br>
</div>
</div>
<div class="row">
<div class=" orange col-lg-4 ">
so much content here
</div>
<div class="col-lg-8">
so much content here
</div>
</div>
My CSS Code:
.col-lg-4 {
background:green;
}
.col-lg-12 {
background:blue;
}
.col-lg-8 {
background: orange;
}
You could try to give the body a heigth of 100vh. This in combination with overflow-y: hidden; will remove the scrollbar.
Take a look at this Fiddle
To activate scrollbar at y-axis of internal div, you need to set overflow-y:scroll. But it activates only when your internal content overflows the assigned height. And to hide body scrollbar use overflow-y as hidden i.e. overflow-y:hidden.
body{
overflow-y:hidden;
margin:0;
}
.col-lg-12 {
background:blue;
}
.col-lg-4 {
background:green;
float:left;
width:50%;
height:100vh;
overflow-y:scroll;
}
.col-lg-8 {
background: orange;
float:left;
width:50%;
height:100vh;
}
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<br>
</div>
</div>
<div class="row">
<div class = "col-lg-4">
so much content here Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in porta nibh. Cras efficitur efficitur urna non ultricies. Fusce tempus pharetra ex, non efficitur orci tempus ac. Morbi lobortis mi ut neque faucibus bibendum. Sed elit orci, aliquam sed arcu sit amet, placerat fringilla ante. Praesent vel tellus quam. Aliquam et nisl vel nisi dapibus dignissim id sed odio. Pellentesque consequat dapibus nisi aliquam tempor. Proin viverra dolor id nibh tristique, at ullamcorper diam porttitor. Duis viverra dapibus viverra. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis commodo neque ac eros suscipit consectetur. Quisque nisi arcu, ullamcorper tincidunt vestibulum eu, sollicitudin eu leo.
Nunc sollicitudin consectetur suscipit. Suspendisse vestibulum a nulla dapibus sagittis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean semper risus quis venenatis elementum. Vestibulum fringilla ipsum id sem luctus pretium. Nunc consequat ornare auctor. Vivamus et ex et mi pellentesque tincidunt fringilla eu arcu. Mauris porttitor volutpat mi. Proin nec ornare sapien. Ut mattis porttitor elementum.
Sed in sapien dapibus, ullamcorper augue nec, volutpat dui. Integer sit amet gravida lacus, eu laoreet arcu. Praesent urna lacus, tristique in diam quis, fermentum rutrum augue. Sed gravida risus vel leo egestas finibus. Ut interdum leo vitae dolor malesuada, quis ullamcorper quam vulputate. Fusce vitae consectetur quam, ut ullamcorper leo. Nullam malesuada dapibus pulvinar. Duis pretium purus at eleifend pharetra.
Curabitur faucibus fermentum neque at tempus. Nam ut consectetur odio. Vivamus risus lectus, suscipit vitae maximus eget, pellentesque interdum purus. Aliquam a eleifend dui. Etiam congue leo a mauris efficitur mollis. Nulla convallis posuere nisl. Morbi pretium ornare enim, ac tristique lacus interdum ullamcorper. Aliquam blandit laoreet dui, a egestas nibh sollicitudin vitae. Vestibulum semper lectus purus, vel tincidunt felis lacinia eget.
Curabitur elit justo, malesuada non laoreet sed, maximus ac eros. Aliquam blandit mauris eget tellus luctus, sed fringilla sapien laoreet. Aliquam erat volutpat. Donec nec hendrerit tellus. Mauris nec erat quis magna pharetra hendrerit. Quisque sit amet sapien non magna blandit cursus at id ante. Fusce non elit at leo sollicitudin consectetur. In quis nibh vitae libero elementum viverra id at turpis. Aliquam vulputate vestibulum orci, non dignissim lorem faucibus vel.
</div>
<div class = "col-lg-8">
so much content here
</div>
</div>
</div>

creating vertically scrollable two divs with zurb foundation

So I'm using Zurb Foundation and I want to create two vertically scrollable divs. llike this example
This is the html
<div class="row">
<div class="scrollablediv">
<section class="small-2 small-offset-8 columns">
<img src="img/blanche.png" alt="Blanche" />
</section>
<section class="small-2 columns">
<img src="img/nuit.png" alt="Nuit" />
</section>
</div>
</div>
and this is the css
.scrollablediv{
height:800px;
overflow-y: scroll;
}
However, When I scroll it, it scrolls both of it. I want them to scroll separately. How would I do that? Thanks in advance
If I understand your question correctly, all you have to do is add overflow: auto; to each child div, not the parent div.
Check it out: https://jsfiddle.net/f3utadqh/
That solves the scrolling issue, but adds scrollbars. A potential solution to that could be here https://stackoverflow.com/a/23771140/4856759
If you are actually trying to get two class "row" divs to scroll separately, try this. I added Lorem Ipsum and a height constraint so you can see how it works.
.scrollablediv {
height: 400px;
overflow-y: scroll;
}
.scrollablediv {
overflow-y: scroll;
height: 100px;
}
<div class="row">
<div class="scrollablediv">
<section class="small-2 small-offset-8 columns">
<img src="img/blanche.png" alt="Blanche" />
<p>Praesent dui sapien, pulvinar ut velit eu, vulputate viverra purus. Suspendisse aliquet, enim cursus luctus luctus, mauris massa pretium nisl, vulputate aliquam risus arcu et erat. Donec varius nisl sit amet neque facilisis eleifend. Donec ut elit eu enim scelerisque malesuada. Quisque finibus leo et est volutpat, a vestibulum enim tempor. Nam pharetra et leo sed venenatis. Maecenas in erat tincidunt, dignissim mauris nec, rhoncus mi. Suspendisse venenatis bibendum ex quis luctus. In vel erat at massa scelerisque pulvinar ac a urna. Nunc mauris nisi, mollis eu ante eget, bibendum tempus dolor. Aliquam porttitor, dolor vel egestas venenatis, mauris erat pretium augue, ac dictum nunc augue eu elit. Curabitur at dictum elit, id ultrices quam. Mauris hendrerit risus id cursus iaculis. Morbi quis justo arcu.</p>
</section>
<section class="small-2 columns">
<img src="img/nuit.png" alt="Nuit" />
</section>
</div>
</div>
<div class="row">
<div class="scrollablediv">
<section class="small-2 small-offset-8 columns">
<img src="img/blanche.png" alt="Blanche" />
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet purus nunc. Curabitur et varius lectus, vel accumsan eros. Vivamus feugiat gravida massa eu euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris a fermentum arcu. Nunc faucibus est hendrerit nisl iaculis, id accumsan mi pretium. Duis porta erat leo, vitae porta ipsum dignissim vel. Mauris sed vestibulum lectus. Maecenas a risus eros. Nulla quis diam lectus. Nam elementum magna et dictum scelerisque. Quisque sit amet purus dolor. Nunc malesuada luctus nibh sed luctus. Ut lectus diam, consectetur sed libero eu, vestibulum cursus magna. Nam bibendum nisl ac est gravida, in consectetur ante tempor. Fusce tincidunt leo leo, sed sollicitudin metus condimentum sed.</p>
</section>
<section class="small-2 columns">
<img src="img/nuit.png" alt="Nuit" />
</section>
</div>
</div>
Okay, try this - each SECTION should now scroll independent of one another, try targeting each section separately?
.scrollablediv {
height: 400px;
}
.scrollablediv section {
overflow-y: scroll;
height: 100px;
}
<div class="row">
<div class="scrollablediv">
<section class="small-2 small-offset-8 columns">
<img src="img/blanche.png" alt="Blanche" />
<p>Praesent dui sapien, pulvinar ut velit eu, vulputate viverra purus. Suspendisse aliquet, enim cursus luctus luctus, mauris massa pretium nisl, vulputate aliquam risus arcu et erat. Donec varius nisl sit amet neque facilisis eleifend. Donec ut elit eu enim scelerisque malesuada. Quisque finibus leo et est volutpat, a vestibulum enim tempor. Nam pharetra et leo sed venenatis. Maecenas in erat tincidunt, dignissim mauris nec, rhoncus mi. Suspendisse venenatis bibendum ex quis luctus. In vel erat at massa scelerisque pulvinar ac a urna. Nunc mauris nisi, mollis eu ante eget, bibendum tempus dolor. Aliquam porttitor, dolor vel egestas venenatis, mauris erat pretium augue, ac dictum nunc augue eu elit. Curabitur at dictum elit, id ultrices quam. Mauris hendrerit risus id cursus iaculis. Morbi quis justo arcu.</p>
</section>
<section class="small-2 columns">
<img src="img/nuit.png" alt="Nuit" />
<p>Praesent dui sapien, pulvinar ut velit eu, vulputate viverra purus. Suspendisse aliquet, enim cursus luctus luctus, mauris massa pretium nisl, vulputate aliquam risus arcu et erat. Donec varius nisl sit amet neque facilisis eleifend. Donec ut elit eu enim scelerisque malesuada. Quisque finibus leo et est volutpat, a vestibulum enim tempor. Nam pharetra et leo sed venenatis. Maecenas in erat tincidunt, dignissim mauris nec, rhoncus mi. Suspendisse venenatis bibendum ex quis luctus. In vel erat at massa scelerisque pulvinar ac a urna. Nunc mauris nisi, mollis eu ante eget, bibendum tempus dolor. Aliquam porttitor, dolor vel egestas venenatis, mauris erat pretium augue, ac dictum nunc augue eu elit. Curabitur at dictum elit, id ultrices quam. Mauris hendrerit risus id cursus iaculis. Morbi quis justo arcu.</p>
</section>
</div>
</div>

Text moving up and down because of bootstrap carousel indicators

I have problem with content under text carousel because, all content under carousel moving up and down when slidiging carousel, I position indicators to be under text, what is best solution in this case?
http://codepen.io/anon/pen/MwGLJd
HTML
<div class="about mainContainer">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<h2 class="fontraleway">WHO WE ARE?</h2>
<div id="locations" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#locations" data-slide-to="0" class="active"></li>
<li data-target="#locations" data-slide-to="1"></li>
<li data-target="#locations" data-slide-to="2"></li>
<li data-target="#locations" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<center>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fermentum nulla augue, in ultrices risus rutrum a. Suspendisse sed porttitor tellus. Ut vitae vulputate sapien, a facilisis quam.
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
<div class="item">
<center>
Sed eget luctus leo, eu sagittis felis. Vestibulum et tellus sed neque gravida pretium vel pellentesque tellus. Nullam in dolor magna. Donec in mauris eget nisl volutpat ornare a ut dolor. Vestibulum sit amet felis et purus sagittis interdum. Quisque quis nisi neque. In viverra lobortis ex in auctor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut at nulla augue. Duis et congue erat. Maecenas odio justo, finibus at nulla at, luctus elementum eros. Quisque eget nisl felis. Phasellus tempus imperdiet dui condimentum bibendum. Sed a turpis quis diam ullamcorper interdum in at lectus
</center>
</div>
<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
</div>
</div>
</div>
</div><!--Closed div row-->
</div><!--Closed div about-->
<div style="clear:both"></div>
<div class="content2">
<p>lor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fer</p>
</div>
CSS
.services h2{
margin-top: 97px;
}
.carousel-indicators li{
background-color: transparent;
border:2px solid #dbdbdb;
overflow:hidden;
}
.carousel-indicators .active{
background-color: #3eb8df;
border:2px solid #3eb8df;
}
.carousel-indicators{
bottom:-60px !important;
}
.carousel-indicators li{
width:15px !important;
height:15px !important;
}
.content2{
margin-top:100px;
color:blue
}
If content for carousel is static use height for class "carousel-inner"
If content is dynamic then you have to find the mx height of item and then assign.

How to stop my background div from overlapping my menu div?

I have a menu on the left side of my page and the content on the rest of the page. I have a dark, textured background so I want a semi-transparent background for the leftmenu div and a semi-transparent background for the content div. However, it seems like the body div is overlapping the menu div and stacking its transparency and also making the content of the menu div transparent.
I would rather have a space between the two sections. Could someone take a look at my code and offer a suggestion?
I have some code listed below but take a look at the jsfiddle to get the full picture.
http://jsfiddle.net/5xmze/ (Note, the links should be the same color as the header)
CSS:
#body{
padding-left:2px;
width: 85%;
position: relative;
background-color:rgba(0,0,0,0.6);
}
#leftside {
float: left;
width: 15%;
height: 100%;
}
HTML:
<div><span id="leftside">
<ul class="leftmenu">
<li class="leftmenu">Home</li>
<li class="leftmenu">Projects</li>
<li class="leftmenu">Resume</li>
<li class="leftmenu">Contact</li>
</ul></span>
</div>
<div id="body">
Content here...
</div>
Here's what I'm attempting to accomplish:
The best way would be to put the menu, and the body into the same parent div, then float:left; the body so it shows up beside the menu.
Don't forget to set a width to both elements, because if #body's width is bigger than space available on the page, it will show up under the menu.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready( function(){
$(window).resize( function() {
var s = $("body").width();
$("body").css({ "min-width":s+"px" });
});
});
</script>
<style>
/* style.css */
body {
font-size: 1em;
background-image:url('http://i1358.photobucket.com/albums/q764/kenny_johnson5/blackorchid_zpsc8d78a87.png');
color:#FFF;
font-family:Arial;
width:85%;
margin-left:16%;
}
h1 {
font-family:Cambria,Serif;
color:#81E500;
text-align:center;
}
#top{
width: 85%;
position: relative;
}
#body{
padding-left:90px;
width: 85%;
position: relative;
background-color:rgba(0,0,0,0.6);
}
a {
color:#81E500;
font-family:Cambria,Serif;
font-size:1.5em;
}
#leftside {
float: left;
width: 15%;
height: 100%;
margin-left:-15%;
z-index:999;
}
ul.leftmenu {
list-style-type:none;
margin:0px;
padding:1px;
background-color:rgba(0,0,0,0.6);
border: 1px solid;
border-color:#000;
height:100%;
}
li.leftmenu {
padding:5px;
}
</style>
<html>
<div><div id="leftside">
<ul class="leftmenu">
<li class="leftmenu">Home</li>
<li class="leftmenu">Projects</li>
<li class="leftmenu">Resume</li>
<li class="leftmenu">Contact</li>
</ul></div>
</div>
<div id="body">
<div id="top">
<h1>Header</h1>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tincidunt erat sit amet dolor imperdiet dignissim. Nunc eu enim erat. Suspendisse commodo faucibus risus at facilisis. Phasellus tortor urna, fringilla sed blandit non, porta vel enim. Vivamus placerat, risus et molestie elementum, risus elit dignissim elit, non porttitor nisl tortor sed lorem. Maecenas scelerisque mattis massa, vel blandit erat blandit sed. Vivamus erat augue, varius ac aliquet non, commodo id massa. Maecenas sit amet est posuere turpis ultrices aliquam. Nulla feugiat ultrices diam vitae egestas. Phasellus risus augue, dapibus nec condimentum non, tempus eu massa. Etiam sodales sodales dolor eu convallis.
</p>
<p>
Aenean in dignissim metus. Suspendisse placerat pharetra justo, et tristique neque vestibulum non. Quisque malesuada scelerisque diam eget suscipit. Donec non sollicitudin justo. Etiam sit amet massa felis. Maecenas aliquet cursus tristique. Etiam sollicitudin augue in risus venenatis rhoncus. Pellentesque tellus diam, porttitor in dapibus eu, rutrum eu lectus. Vestibulum luctus hendrerit augue vitae interdum. Donec in turpis malesuada arcu tempor placerat. Aliquam eget nisl ipsum. Cras blandit elementum vulputate. Ut vulputate ullamcorper urna, quis congue mauris laoreet nec. Morbi vitae dui eros.
</p>
<p>
Phasellus rhoncus ultrices sem et dictum. Ut ut nisl eget eros porttitor commodo auctor vitae leo. Quisque sed nulla augue, vel venenatis augue. Pellentesque bibendum sodales lectus, quis malesuada risus consectetur a. Aliquam lobortis aliquet vulputate. Duis sed velit est, in venenatis est. Vivamus viverra lacinia sapien non sodales. Aenean eleifend quam diam, id gravida tellus. Praesent dui sem, volutpat eu blandit in, volutpat ornare nulla. Nunc sed eros dolor.
</p>
<p>
Quisque sit amet diam nisl, volutpat interdum arcu. Proin et justo lorem. Mauris vitae egestas lacus. Nullam ut laoreet turpis. Donec eget metus enim, id porta orci. Nam condimentum feugiat tempor. Nunc ultricies pellentesque euismod. In hac habitasse platea dictumst. Etiam fringilla bibendum sapien, eu vestibulum nisi imperdiet tempus. Duis tincidunt magna id sapien porta vel aliquam massa tincidunt. Maecenas ut metus id augue congue scelerisque id nec enim. Ut ac nibh est, et laoreet orci. Nulla fermentum laoreet augue, in vulputate risus varius vel. Sed ac nunc quis tortor scelerisque rutrum.
</p>
<p>
Nullam adipiscing ultricies lacus ac pretium. In hac habitasse platea dictumst. Nullam convallis libero non augue sollicitudin mattis. Nunc commodo pharetra magna, tempor sagittis sem vehicula nec. Quisque massa ligula, gravida nec fringilla quis, tempus vel dolor. Nam et sem bibendum mi consectetur tincidunt. Nam placerat venenatis odio sit amet imperdiet. Integer luctus quam quis quam lobortis aliquam. Cras dignissim semper erat, ac laoreet leo volutpat quis. </p>
</div>
</body>
</html>