What is the best way to align my carousel in the middle of the

After trying various suggestions without success, I'm sharing my code here in hopes that someone can help guide me in the right direction.

  1. I am aiming to center the carousel.
  2. I would like to add a separate container inside the carousel with text, and have that container appear somewhat faded using either an opacity element or RGB (0,0,0,0.4) element.

HTML-

To view my HTML code, please visit this link on Codepen:

https://codepen.io/mahiya-hawk/pen/YvZMbM

CSS-

* {
    margin: 0;
    padding: 0;
}
body {
    font-family: Calibri, sans-serif;
}
.background-wrap {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: -1000;
}
#video-bg-elem {
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
}
.navbar{
    background-color: RGBA(0,0,0,0.2) !important;
}
#brand-image{
    height: 100px;
}
a.navbar-brand{
    position: relative;
}
.navbar-nav > li{
    margin-left:10px;
    padding: 33px 10px;
  }
.navbar-nav > li > a{
    text-decoration: none;
    font-size: 2vh;
    font-size: 2.3vw;
    font-family: 'Freestyle Script';
    font-weight: 900;
    color: rgb(210, 21, 84) !important;
    padding-bottom: 0.2%;
    display: block;
}
.navbar-nav > li:hover,
.navbar-nav > li:focus {
    background-color: RGBA(0,0,0,0.4) !important;
    transition: .9s;
}
.navbar-nav > .active > a,
.navbar-nav > .active > a:hover,
.navbar-nav > .active > a:focus {
    background-color: RGBA(0.0..0.4) !important;
}
.content {
    position: absolute;
    width: 100%;
    min-height: 100%;
}
.content h1 {
    text-align: center;
    font-size: 65px;
    text-transform: uppercase;
    font-weight: 300;
    color: #fff;
    margin-top: 5%;
    margin-bottom: 10px;
}
.content p {
    text-align: center;
    font-size: 20px;
    letter-spacing: 3px;
    color: #aaa;
}
.navbar-expand-lg .navbar-collapse {
    margin:-7px;
}
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
.carousel {
    width: 1200px;
    margin-bottom: 480px;
}

/* Since positioning the image, we need to help out the caption */
.carousel-caption {
    z-index: 10;
}

/* Declare heights because of positioning of img element */
.carousel .item {
    height: 500px;
    background-color: #777;
}

.carousel-inner > .item > img {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 480px;
}

Answer №1

Implement the following guideline in your design:

.slideshow {
    max-width: 1000px;
    width: auto;
    margin: 0 auto 0 auto;
    text-align: center;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I overlay an environment map onto existing materials in ThreeJS?

Hello, I am a beginner in ThreeJS and I'm currently working on adding an Environment Map on top of the materials loaded using JSON loader. This is my approach: var gun = null; var loader = new THREE.JSONLoader(); loader.load("obj/nissan/nissan-gt-r-n ...

What is the best way to align a single row in the center and another row at the bottom using Bootstrap?

I'm struggling with aligning two rows within a section element that has a vh-100 height. The first row consists of 2 cols (headers, image, and dropdown) that I want to vertically align to the middle of the container. The second row just contains an i ...

jQuery shorthand conditional statements

I currently have a jQuery function that is triggered by two separate buttons. $("#btnSearch, #btnDirectorSearch").click(function () { The construction of the HTML output within this function relies on which button was clicked. To accomplish this, I am ut ...

Looking to display a single Angular component with varying data? I have a component in Angular that dynamically renders content based on the specific URL path

I have a component that dynamically renders data based on the URL '/lp/:pageId'. The :pageId parameter is used to fetch data from the server in the ngOnInit() lifecycle hook. ngOnInit(){ this.apiHelper.getData(this.route.snapshot.params.pageId) ...

Is there a way in MongoDB to compare all elements in a collection with a larger array?

Imagine I am working with a collection that contains 3 items: [ { id: 'x', elements: [10, 20, 30] }, { id: 'y', elements: [40, 50, 60] }, { id: 'z', elements: [70, 8 ...

The Conundrum of Material UI Picker and date-fns Compatibility

I'm facing an issue with the material-ui-pickers example in my React application using Material UI. Here is the online example provided by Material UI: https://codesandbox.io/s/52p74362pl The error message I'm encountering is: index.js:1446 .. ...

The behavior of comparing variables in Javascript

Encountering an unusual issue while attempting to compare two strings using regex. Even after comparing both variables in the watch, the result remains the same. Seeking assistance in identifying the cause. Below is my code and also an image showcasing the ...

The update function for colors in Three.js is not being triggered when colorsNeed

I'm attempting to change the color of a face on an external event - button click. Despite searching for solutions, none have been successful so far. I have an interactive model that I want to be able to toggle its colors. The model is rendered and co ...

Creating applications with Angular2 and TypeScript is possible even without utilizing NPM for development

I've seen all the guides recommend installing npm, but I'm determined to find an alternative method. I found Angular2 files available here, however, none of them are in TypeScript code. What is the best course of action? Do I need Angular2.ts, ...

Determine the Orientation of an Accelerometer using a JavaScript function in Node-RED

Is there a way to determine the orientation of a sensor using a JavaScript function? I came across an example on 3D Accelerometer calculate the orientation, but I'm struggling to understand how to utilize the values of msg.payload.xAxis/yAxis/zAxis fo ...

The issue of req.files being undefined in Express.js

I am aiming to upload files to s3 without depending on any middleware like multer. Below is the code snippet of my approach: <form role="form" action="/send" method="post"> <input type="file" name="photo" class="form-control"/> <button ...

Delay the execution in selenium webdriver using Java until the login button is clicked manually

Can Selenium Webdriver be used to pause code execution with webdriver.wait until the user clicks the login button on a form? The form includes a Captcha that requires manual input, preventing automated clicking of the button by the script. Clicking the log ...

Converting line breaks into a visible string format within Angular

After thorough research, all I've come across are solutions that demonstrate how to display the newline character as a new line. I specifically aim to exhibit the "\n" as a string within an Angular view. It appears that Angular disrega ...

Typedi's constructor injection does not produce any defined output

I am utilizing typedi in a Node (express) project and I have encountered an issue related to injection within my service class. It seems that property injection works fine, but constructor injection does not. Here is an example where property injection wo ...

What is causing my device form to malfunction - could it be the <form> HTML tag?

How can I resolve the issue with my devise sign up form not submitting when using the HTML "form" tag? Removing the tag allows everything to work correctly without any errors. <form> <div class="form-group"> & ...

The most efficient method for distributing code between TypeScript, nodejs, and JavaScript

I am looking to create a mono repository that includes the following elements: shared: a collection of TypeScript classes that are universally applicable WebClient: a react web application in JavaScript (which requires utilizing code from the shared folde ...

Unusual css glitch observed when hovering over a span/link

Currently, I'm struggling with a CSS code issue. My goal is to have the div #hidden show when someone hovers over the link in #trigger. <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> ...

Crafting a stylish vertical timeline using Tailwind and CSS: Step-by-step guide

I am attempting to design a timeline for a react app where odd children are displayed on the left side of the timeline and even children on the right side. Here is an image for reference: https://i.sstatic.net/YnNFU.png The issue I am facing is that I am ...

Deactivate input field upon selecting radio button

In my form, there are two radio buttons with corresponding text input fields. When one radio button is selected, I want the other radio button and its associated text input fields to be disabled, and vice versa. ...

Tips for eliminating redundancy in $scope manipulation code within multiple controllers using angularJS

Apologies if this question seems trivial, but I am just getting started with angularJS. I have created two controllers: seekerController and wizardController... Within the wizardController, there is a Scope object called chat, which is being manipulated ...