Center responsive bootstrap carousel - html

I'm trying to fully customize a bootstrap carousel. I need to have it on the sidebar with the indicators at the bottom(outside the carousel). So far I was I able to make it work on large screens, but on smaller screens, the carousel refuse to be centered in the middle. Is there is a way to keep it centered (without using margin)? Thanks in advance
The current result:
The HTML of the element in question:
.other-articles {
padding: 1.2rem;
}
.other-articles>h3 {
font-size: .8rem;
}
.others {
padding: 1.2rem;
margin-top: 1.2rem;
margin-bottom: 1.2rem;
}
.other-places {
margin-top: 1.5rem;
}
.flex-other-articles {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.item-other-articles {
display: flex;
align-items: center;
border-bottom: 1px solid rgba(162, 163, 163, 0.344);
margin-top: .2rem;
}
.last-it-oth {
border-bottom: none !important;
}
.item-other-articles img {
border-radius: 3px;
margin-top: -.7rem;
height: 50px;
width: 56px;
flex-grow: 0;
flex-shrink: 0;
}
.item-other-articles-txt {
margin-left: .7rem;
}
.item-other-articles-txt>h6 {
font-size: .7rem;
}
.item-other-articles-txt>p {
font-size: .6rem;
}
#media (max-width:965px) and (min-width:780px) {
.other-articles {
text-align: center;
}
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<div class="others block">
<h6>OTHER PLACE</h6>
<div class="other-place-dots">
<i class="fas fa-circle"></i>
<i class="fas fa-circle"></i>
<i class="fas fa-circle"></i>
</div>
<div class="the-mini-slider-on-the-sidebar container-fluid">
<div id="carouselExample" class="carousel slide" data-ride="carousel">
<div class="carousel-inner mini-carousel-img">
<div class="carousel-item">
<img class="d-block w-100 " src="https://i.imgur.com/lCcKhji.jpg" alt="First slide">
<div class="carousel-caption d-none d-md-block cap-1-black">
<div class="carr-text-img">
<h5>Ski Lifts</h5>
</div>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100" src="https://i.imgur.com/lCcKhji.jpg" alt="Second slide">
<div class="carousel-caption d-none d-md-block cap-1-black">
<div class="carr-text-img">
<h5>Ski Lifts</h5>
</div>
</div>
</div>
<div class="carousel-item active">
<img class="d-block w-100" src="https://i.imgur.com/lCcKhji.jpg" alt="Third slide">
<div class="carousel-caption d-none d-md-block cap-1-black">
<div class="carr-text-img">
<h5>Ski Lifts</h5>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExample" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="carousel slide carousel-in-li" data-ride="carousel">
<ol class="carousel-indicators carousel-in-1">
<li data-target="#carouselExample" data-slide-to="0" class=""></li>
<li data-target="#carouselExample" data-slide-to="1" class=""></li>
<li data-target="#carouselExample" data-slide-to="2" class="active"></li>
</ol>
</div>
</div>
</div>
</div>

Related

Slider not fitting span of window css issue?

Hi everyone nice to be here on stackoverflow, I'm just having a bit of trouble fitting the slider to the span of the window happens in every browser any ideas would be very greatful. Thank you in advance. I have added the CSS and HTML code below this comment.
Hi everyone nice to be here on stackoverflow, I'm just having a bit of trouble fitting the slider to the span of the window happens in every browser any ideas would be very greatful. Thank you in advance. I have added the CSS and HTML code below this comment.
Snapshot of site im working on
/*-----Slider-----*/
#slider{
width: 100%;
margin: auto;
font-family: Chakra Petch;
}
.carousel-caption{
top: 50%;
transform: translateY(-50%);
bottom: initial !important;
}
.h1-0{
color: black !important;
font-size: 40px;
font-weight: bold;
background: #fff !important;
opacity: 0.8;
}
.h1-1{
color: black !important;
font-size: 40px;
font-weight: bold;
background: #fff !important;
opacity: 0.8;
}
.h1-2{
color: black !important;
font-size: 40px;
font-weight: bold;
background: #fff !important;
opacity: 0.8;
}
.h1-3{
color: black !important;
font-size: 40px;
font-weight: bold;
background: #fff !important;
opacity: 0.8;
}
<!-- Slider -->
<div id="slider" data-aos="fade-up" data-aos-duration="2000" data-aos-delay="1300">
<div id="headerSlider" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#headerSlider" data-slide-to="0" class="active"></li>
<li data-target="#headerSlider" data-slide-to="1"></li>
<li data-target="#headerSlider" data-slide-to="2"></li>
<li data-target="#headerSlider" data-slide-to="3"></li>
<li data-target="#headerSlider" data-slide-to="4"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/welcome-slider-image.jpg" class="d-block img-fluid" alt="Welcome Image">
</div>
<div class="carousel-item">
<img src="img/webdesign-image.jpg" class="d-block img-fluid" alt="Website Design Image">
<div class="carousel-caption">
<h1 class="h1-0">Web Site Design</h1>
</div>
</div>
<div class="carousel-item">
<img src="img/seo-slider-image.jpeg" class="d-block img-fluid" alt="SEO Image">
<div class="carousel-caption">
<h1 class="h1-1">Search Engine Optimization<br></h1>
</div>
</div>
<div class="carousel-item">
<img src="img/software-development-slider-image.png" class="d-block img-fluid" alt="App Development Image">
<div class="carousel-caption">
<h1 class="h1-2">App & Software Development<br></h1>
</div>
</div>
<div class="carousel-item">
<img src="img/cyber-security.jpg" class="d-block img-fluid" alt="Software Development Image">
<div class="carousel-caption">
<h1 class="h1-3">Cyber Security<br></h1>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#headerSlider" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#headerSlider" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>

html: overflow issue on mobile

I'm having an issue with parallax effect on mobile. In fact it seems like that total body size is > 100vh (it also appear the scroll bar o the side). Obv if I change overflow-y from auto to hidden, it fix the problem but it also cut out part of the page. On desktop it doesn't happen. Can anybody help me?
Screenshot:
https://imgur.com/a/n9wMmqN
.selector-for-some-widget {
box-sizing: content-box;
}
header .carousel-item {
height: 100vh;
min-height: 350px;
background: no-repeat center center scroll;
-webkit-background-size: cover;
background-size: cover;
}
body {
margin: 0;
background-color: white;
font-family: 'Open Sans', sans-serif;
min-height: 100%;
}
.wrapper {
height: 100vh;
overflow-y: auto;
overflow-x: hidden;
perspective: 10px;
}
header {
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: calc(100% - 75px);
transform-style: preserve-3d;
z-index: -1;
}
.background {
transform: translateZ(-10px) scale(2.5);
}
.background {
position: absolute;
height: 100%;
width: 100%;
object-fit: cover;
z-index: -1;
}
.title {
font-family: 'Montez', cursive;
color: white;
text-align: center;
}
section {
background-color: white;
}
.navbar {
height: 75px;
font-size: 1.25rem;
letter-spacing: 3px;
font-weight: bold;
}
.navbar-brand {
font-size: 1.75rem;
letter-spacing: 10px;
}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- Bootstrap Icon CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons#1.8.1/font/bootstrap-icons.css">
<!-- Style CSS -->
<link rel="stylesheet" href="css/styles.css">
<title>Ariano Francesco Photography</title>
</head>
<body>
<div class="wrapper">
<header>
<div id="carouselExampleControls" class="carousel slide background" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" style="background-image: url('img/carousel_1.jpg')">
</div>
<div class="carousel-item" style="background-image: url('img/carousel_2.jpg')">
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls"
data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls"
data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
<div class="title">
<h1>Ariano Francesco</h1>
<h2>Photography</h2>
</div>
</header>
<section>
<nav class="navbar navbar-expand-lg navbar-light bg-white sticky-top shadow-sm">
<div class="container px-5">
<a class="navbar-brand" href="#">AFR</a>
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar"
aria-controls="offcanvasNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasNavbar"
aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header justify-content-end">
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"
aria-label="Close"></button>
</div>
<div class="offcanvas-body d-flex text-center align-items-center">
<ul class="navbar-nav justify-content-end flex-grow-1">
<li class="nav-item ms-2">
<a class="nav-link active" aria-current="page" href="index.html">Gallery</a>
</li>
<li class="nav-item ms-2">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
<div class="container px-5">
<div class="text-center mt-5">
<h2 class="fw-bold fade-in">Gallery</h2>
</div>
<div class="row mt-5">
<div class="col-lg-4 col-md-12">
<a href="img/_IMG1556.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG1556.jpg" class="img-fluid rounded mb-4">
</a>
<a href="img/_IMG1594.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG1594.jpg" class="img-fluid rounded mb-4">
</a>
</div>
<div class="col-lg-4">
<a href="img/_IMG1491.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG1491.jpg" class="img-fluid rounded mb-4">
</a>
<a href="img/_IMG1558.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG1558.jpg" class="img-fluid rounded mb-4">
</a>
</div>
<div class="col-lg-4">
<a href="img/_IMG74c91.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG74c91.jpg" class="img-fluid rounded mb-4">
</a>
<a href="img/_IMG1510.jpg" data-toggle="lightbox" data-gallery="gallery" class="fade-in">
<img src="img/_IMG1510.jpg" class="img-fluid rounded mb-4">
</a>
</div>
</div>
</div>
<footer class="text-center text-muted">
<div class="container px-5">
<div class="mb-4 border-bottom">
<a class="btn btn-floating m-3" href="https://instagram.com/_afr.photo" role="button"><i
class="bi bi-facebook"></i></a>
<a class="btn btn-floating m-3" href="https://www.facebook.com/ArianoFrancescoPH" role="button"><i
class="bi bi-instagram"></i></a>
</div>
<div class="mb-4">
<h6 class="text-uppercase fw-bold mb-4">
Contact
</h6>
<p>
Castagnole delle Lanze, AT
</p>
<p>
franci.ariano#gmail.com
</p>
<p>
339 2350792
</p>
</div>
</div>
<div class="p-4" style="background-color: rgba(0, 0, 0, 0.05);">
© 2022 Copyright:
<a class="text-reset fw-bold" href="www.afr.altervista.org">Ariano Francesco Photography</a>
</div>
</footer>
</section>
</div>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
<!-- Lightbox for Bootstrap 5 -->
<script src="https://cdn.jsdelivr.net/npm/bs5-lightbox#1.7.11/dist/index.bundle.min.js"></script>
<!-- Script.js -->
<script src="js/script.js"></script>
</body>
</html>
Look at this answer: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
let vh = window.innerHeight * 0.01;
// Then we set the value in the --vh custom property to the root of the document
document.documentElement.style.setProperty('--vh', `${vh}px`);
body {
background-color: #333;
}
.module {
height: 100vh; /* Use vh as a fallback for browsers that do not support Custom Properties */
height: calc(var(--vh, 1vh) * 100);
margin: 0 auto;
max-width: 30%;
}
.module__item {
align-items: center;
display: flex;
height: 20%;
justify-content: center;
}
.module__item:nth-child(odd) {
background-color: #fff;
color: #F73859;
}
.module__item:nth-child(even) {
background-color: #F73859;
color: #F1D08A;
}
<div class="module">
<div class="module__item">20%</div>
<div class="module__item">40%</div>
<div class="module__item">60%</div>
<div class="module__item">80%</div>
<div class="module__item">100%</div>
</div>
Fix 100vh Issue on Mobile Devices Using CSS Only
Sometimes, the purpose of using vh unit is to simply create sections equal to the height of the viewport. This is common when you are building landing pages, for instance. In these situations, position sticky won’t help and I want to introduce the fill-available property. It’s easy to use, just remember to use the prefixes and the fall-back value:
.layout {
min-height: 100vh; /* fall-back */
min-height: -moz-available;
min-height: -webkit-fill-available;
min-height: fill-available;
}
Just as simple as that!

HTML5 VIdeo Controls visibility / z-index

Hello I have a Carousel in bootstrap with a video in it
The main problem I can't fix is that video controls cannot be clicked because of the carousel indicators.
I tried to add some margin and padding to them and it worked for the begging and the end of the video (where the two coincide, but then in the middle of the seeking bar I can't click without any reason). If I didn't explain me please let me know.
I couldn't add any snippet but you can see what I am trying to explain on my site: Here
HTML:
<div id="carousel-home" class="carousel slide carousel-fade" data-ride="carousel" data-interval="false">
<ol class="carousel-indicators">
<li data-target="#carousel-home" data-slide-to="0" class="active"></li>
<li data-target="#carousel-home" data-slide-to="1" id="slide_1"></li>
<li data-target="#carousel-home" data-slide-to="2" id="slide_2"></li>
<li data-target="#carousel-home" data-slide-to="3" id="slide_3"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<video id="myvideo" class="crop" poster="imgs/video_thumb.jpg" preload="auto" playsinline controls>
<source src="vid/video_2019.mp4" type="video/mp4" onclick="this.play();">
</video>
</div>
<div class="carousel-item">
<img class="d-block w-100 mx-auto" src="imgs/slider/1.png" alt="First slide">
<div class="carousel-caption">
<h2 class="title" style="text-shadow: 1px 1px black">First</h2>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100 mx-auto" src="imgs/slider/2.png" alt="Second slide">
<div class="carousel-caption">
<h2 class="title" style="text-shadow: 1px 1px black">Second</h2>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100 mx-auto" src="imgs/slider/3.png" alt="Third slide">
<div class="carousel-caption">
<h2 class="title" style="text-shadow: 1px 1px black">Third</h2>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carousel-home" role="button" data-slide="prev" id="carousel_l">
<i class="fa fa-chevron-left"></i>
<span class="sr-only">Back</span>
</a>
<a class="carousel-control-next" href="#carousel-home" role="button" data-slide="next" id="carousel_r">
<i class="fa fa-chevron-right"></i>
<span class="sr-only">Next</span>
</a>
</div>
CSS:
.carousel-indicators li {
margin-bottom: 2rem;
padding-bottom: 1rem;
padding-top: 1rem;
border-radius: 100%;
}
.carousel-item img {
object-fit: cover
}
.carousel-item {
overflow:hidden;
}
JQuery:
$(window).ready(function() {
$('#carousel_l').on("click", function() {
$('#myvideo').get(0).pause();
});
$('#carousel_r').on("click", function () {
$('#myvideo').get(0).pause();
});
$('#slide_1').on("click", function () {
$('#myvideo').get(0).pause();
});
$('#slide_2').on("click", function () {
$('#myvideo').get(0).pause();
});
$('#slide_3').on("click", function () {
$('#myvideo').get(0).pause();
});
});
You can use
.carousel-indicators {
pointer-events: none;
}
.carousel-indicators > li {
pointer-events: auto;
}
to remove the interactivity of the carousel indicators.

Carousel to display full width of screen for small screens only

I have a carousel that is centered and only takes half the screen by adding this to the class "w-50". When the browser resizes to a smaller screen, like a mobile device, I want that carousel to take up the whole width of the screen. To do this I'm sure I'll need to find a way to change that to "w-100", but I'm not sure how to go about doing that.
I have tried to play around with #media in CSS, but haven't had any luck.
<div id="catalogueSelection">
<div id="catalogueCarousel" class="carousel slide w-50" data-ride="carousel" data-interval="5000">
<ol class="carousel-indicators">
<li data-target="#catalogueCarousel" data-slide-to="0" class="active"></li>
<li data-target="#catalogueCarousel" data-slide-to="1"></li>
<li data-target="#catalogueCarousel" data-slide-to="2"></li>
<li data-target="#catalogueCarousel" data-slide-to="3"></li>
<li data-target="#catalogueCarousel" data-slide-to="4"></li>
<li data-target="#catalogueCarousel" data-slide-to="5"></li>
<li data-target="#catalogueCarousel" data-slide-to="6"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img id="franceImage" class="d-block w-100" src="../images/france.jpg">
<div class="carousel-caption countryCaption">
<h2>France</h2>
<p>See Products</p>
</div>
</div>
<div class="carousel-item">
<img id="italyImage" class="d-block w-100" src="../images/italy.jpg">
<div class="carousel-caption countryCaption">
<h2>Italy</h2>
<p>See Products</p>
</div>
</div>
<div class="carousel-item">
<img class="d-block w-100" src="../images/spain.jpg">
<div class="carousel-caption countryCaption">
<h2>Spain</h2>
<p>See Products</p>
</div>
</div>
<div class="carousel-item">
<img id="lebanonImage" class="d-block w-100" src="../images/lebanon.jpg">
<div class="carousel-caption countryCaption">
<h2>Lebanon</h2>
<p>See Products</p>
</div>
</div>
<div class="carousel-item">
<img id="southAfricaImage" class="d-block w-100" src="../images/south_africa.jpg">
<div class="carousel-caption countryCaption">
<h2>South Africa</h2>
<p>See Products</p>
</div>
</div>
<div id="southAmericaImage" class="carousel-item">
<img class="d-block w-100" src="../images/south_america.jpg">
<div class="carousel-caption countryCaption">
<h2>South America</h2>
<p>See Products</p>
</div>
</div>
<div id="domesticImage" class="carousel-item">
<img class="d-block w-100" src="../images/united_states.jpg">
<div class="carousel-caption countryCaption">
<h2>Domestic</h2>
<p>See Products</p>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#catalogueCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#catalogueCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
#catalogueCarousel {
margin: auto;
border: 3px solid;
border-color: black;
}
.carousel-inner {
}
.carousel-item img {
height: 500px; !important
overflow: hidden;
opacity: 0.9;
opacity: 0.8;
}
.countryCaption h2 {
color: red;
font-family: 'Prosto One', cursive;
opacity: 1; !important
}
.countryCaption p{
color: darkred;
font-weight: bold;
font-family: 'Prosto One', cursive;
font-size: 20px;
opacity: 1; !important
}
Above is a snippet of the carousel html code, as well as it's stylesheet.
Any tips or ideas to help me resolve this is appreciated.
Thank you.
You can try using a combination of media queries and the !important rule.
Assuming 768px is your mobile breakpoint:
#media(max-width:768px){
#catalogueCarousel {
width: 100% !important;
}
}
Alternatavely you could use jQuery:
function resizeCarousel() {
if($window.width() < 768) {
$('#catalogueCarousel')
.removeClass('w-50')
.addClass('w-100');
} else {
$('#catalogueCarousel')
.removeClass('w-100')
.addClass('w-50');
}
}
resizeCarousel();
$window.resize(resizeCarousel);
You just need add media query for small device. Add below CSS in style sheet i hope it'll resolve your issue. Thanks
#media only screen and (max-width: 768px) {
#catalogueCarousel {
width: 100% !important;
}
}

[Carousel]Dark background bellow text and Circle pagination [boostrap 4]

Is anyone could help me with 2 stuffs or one of then on boostrap 4
I wanna do 2 stuffs just like on this IMG:
https://i.imgur.com/Vh1CDe3.png
1- Dark background below Title/Subtitle carousel's
2- I made the pagination more higher, and circular...
But how to show this right inside of circle?
How it's working now:
i.imgur.com/NT48cqX.png
full code:
<style type="text/css">
/* dark background */
#news img {
width: 1300px;
height: 400px;
}
div.carousel-caption {
background:rgba(0,0,0,0.6);
text-shadow:none;
}
div.carousel-caption:hover {
background:rgba(0,0,0,0.9);
}
/* Carousel Title */
h3, .h3 {
font-size:20px;
color: #063;
font-family:'Buenard', serif;
font-weight:bold;
text-transform:inherit;
margin: 0px auto 0px;
text-shadow: 2px 2px 2px #000;
-webkit-text-shadow: 2px 2px 2px #000;
-moz-text-shadow: 2px 2px 2px #000;
text-align: center;
}
/* Pagination */
.carousel-indicators .active {
background: #666;
}
.carousel-indicators :hover {
background-color: #cccccc;
}
.slider-pagi__elem {
padding: 10px 10px;
color: #083F2C;
text-decoration: none;
outline: none;
-webkit-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
font-family: Arial;
font-size: 16.9px;
position: relative;
bottom: 350px;
left: 480px;
display: inline-block;
vertical-align: top;
width: 2rem;
height: 2rem;
margin: 0 0.5rem;
border-radius: 50%;
border: 2px solid #fff;
cursor: pointer;
}
</style>
<main role="main" class="container_body">
<div class="container" id="news">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<!-- indicators dot nov -->
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="slider-pagi__elem slider-pagi__elem-2"class="active">1</li>
<li data-target="#carouselExampleIndicators" class="slider-pagi__elem slider-pagi__elem-2" data-slide-to="1">2</li>
<li data-target="#carouselExampleIndicators" class="slider-pagi__elem slider-pagi__elem-2" data-slide-to="2">3</li>
<li data-target="#carouselExampleIndicators" class="slider-pagi__elem slider-pagi__elem-2" data-slide-to="3">4</li>
</ol>
<!-- wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="d-block img-fluid" src="http://placehold.it/900x400" alt="">
<div class="carousel-caption">
<h3>Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</h3>
<p>Bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb. <a class="label label-primary" href="#" target="_blank">Read more:</a></p></p>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="http://placehold.it/900x400" alt="">
<div class="carousel-caption">
<h3>Ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</h3>
<p>Ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.: <a class="label label-primary" href="#" target="_blank">Read more:</a></p></p>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="http://placehold.it/900x400" alt="">
<div class="carousel-caption">
<h3>Ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</h3>
<p>Ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.: <a class="label label-primary" href="#" target="_blank">Read more:</a></p></p>
</div>
</div>
<div class="carousel-item">
<img class="d-block img-fluid" src="http://placehold.it/900x400" alt="">
<div class="carousel-caption">
<h3>Ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</h3>
<p>Ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.: <a class="label label-primary" href="#" target="_blank">Read more:</a></p></p>
</div>
</div>
</div>
<!-- controls or next and prev buttons -->
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
</main>
The dark background at the bottom should be a div, not image. You can probably do it on the div that has a class of carousel-caption.
EDIT: The get the carousel-caption full width, change .carousel-caption from right: 15% to right: 0% and left: 15% to left: 0%
This will make the text go all the way. Don't forget to include some padding if you need a bit of space from the edge.