The background image of my bootstrap carousel is not responsive to changes in the browser window size

Hey there, I'm new to the world of programming and currently working on a project to create the front end of my personal website. I've opted to utilize a bootstrap carousel background image slider in my index.html file. However, I've noticed that the size of the page tends to shrink and the text in the carousel also shrinks and overlaps when I adjust the browser screen.

You can check out what I mean here

This is a snippet of my code:

.container {
    margin-top: 20px;
}

.navbar{
  background-color : #3e403e;
}

.text h1{
    font-size: 110px
}

.text p{
    font-size: 40px
}

hr{
    background-color: white

}


.text a{
padding: 15px 80px 15px 80px;
}

.header-text {
    position: absolute;
    top: 20%;
    left: 1.8%;
    right: auto;
    width: 96.66666666666666%;
}
<div id="indexCarousel" class="carousel slide" data-ride="carousel">
    <div class="carousel-inner">
        <div class="carousel-item active">
            <img class="d-block w-100" src="images/background.png" alt="Slide One">
        </div>

        <div class="carousel-item">
            <img class="d-block w-100" src="images/background 2.png" alt="Slide Two">
        </div>

        <div class="carousel-item">
            <img class="d-block w-100" src="images/background 3.png" alt="Slide Three">
        </div>
        <div class="header-text hidden-xs">
            <div class="col-md-12 text center">
                <div class="container">
                    <div class="text">
                        <h1 class="display-4" style="color:white"><strong>Beats, Sounds Vibes!!!</strong></h1>
                        <p class="lead" style=" color:white">What are you waiting for?</p>
                        <hr class="my-4">
                        <p style="color: white">XQ's music is made from the purest selection of industry-level sounds
                            and
                            samples. Vibe with him, and you"ll see what we're talking about.</p>
                        <a class="btn btn-primary btn-lg" href="beats.html" role="button">Dive in</a>
                    </div>
                </div>

            </div>
        </div>

    </div>


</div>

I would really appreciate any assistance you can provide. Thank you!

Answer №1

Implement the @media screen and (max-width: 600px) rule in your CSS to style elements for smaller screens.

 @media screen and (max-width: 600px) {
.text h1{
    font-size: 40px
}
}

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

Writing and altering content within the <code> element in Chrome is unreliable

Utilizing a WYSIWYG Editor with contenteditable functionality allows users to input "code snippets" using a <code> element. Here is an example: <div contenteditable="true"> <p> This is a paragraph with an <code>inline s ...

Implementing Jquery Ajax pagination with dynamic content loading

As a newcomer to ajax and jquery, I am currently working on building a search page that will contain numerous records and therefore needs to be paged. While researching tutorials on how to accomplish this task, most examples I found included page numbers d ...

Tips for troubleshooting objects within an Angular template in an HTML file

When I'm creating a template, I embed some Angular code within my HTML elements: <button id="btnMainMenu" class="button button-icon fa fa-chevron-left header-icon" ng-if="(!CoursesVm.showcheckboxes || (CoursesVm.tabSelected == 'curren ...

Can you explain the distinction between using destructuring syntax and an empty parameter when calling a render function?

After writing some code in React, I found using this.props to be too verbose. So, I researched some articles and learned how to approach this issue while coding. class MyComponent extends Component { // the traditional method render() { re ...

Utilizing the jQuery library for flexible REST API requests with the incorporation

I'm currently utilizing jQuery getJSON to fetch posts from the WP API v2. There are some input fields that I'd like to make clickable, and then add extra parameters to the request URL. Here are some example requests: Posts - https://www.example ...

What could be causing my Material UI Divider to appear invisible within a Material UI Container or Paper component?

Hey there! I am absolutely smitten with Material UI - it's incredibly versatile. However, I'm facing a bit of trouble with the Material UI Divider not displaying when nested within either a Container or Paper component. I've looked into it ...

What are the steps to create a ListView in a ChatApp for organizing and viewing all conversations?

In developing my chat application, I am considering using a List to organize all the chats. Since my app is integrated with Firebase, I am faced with the decision of whether to utilize a FlatList and store all data locally or in a Firebase database. What ...

Does Vuejs have a counterpart to LINQ?

As a newcomer to javascript, I am wondering if Vue has an equivalent to LinQ. My objective is to perform the following operation: this.selection = this.clientsComplete.Where( c => c.id == eventArgs.sender.id); This action would be on a collect ...

Submit a form to the same page without reloading and toggle the visibility of a div after submission

Is there a way to submit a form without refreshing the page and hiding the current div while showing a hidden one? I attempted to use the following code, but it ends up submitting the form and reloading the page. <form method="post" name="searchfrm" a ...

Can the default Bootstrap classes in the ExtLib application layout control be modified?

I am currently using the responsive Bootstrap theme in combination with the application layout control in extlib, but I have been unable to locate any documentation on whether it is possible to modify the predefined Bootstrap classes. In the example below ...

What is a more streamlined approach to creating a series of methods and functions that alter a single variable consecutively?

My JavaScript project involves handling sub-arrays within a long data file that cannot be altered. The data, stored in a variable named data, is retrieved via a script tag with a specified URL property. I need to extract and modify specific sub-arrays from ...

Disable location prompt feature when using AngularJS with Maps API

For my web application, I developed a feature that includes a map with custom markers using Angular loops: <map data-ng-model="mymap" zoom="4" center="[38.50, -95.00]" style="heigth:375px"> <div ng-repeat="item in list"> <marker pos ...

Serialize a series of select boxes to optimize for AJAX POST requests

To better explain my issue, let's consider a simple example: Imagine I have a form that collects information about a user: <form action="#" method="post" id="myform"> <input type="text" name="fname" /> <input type="text" name= ...

How to dynamically deactivate dates in a jQuery datepicker

For my current project, I need to implement a feature where the user can select a hotel, arrival date, and departure date. Upon selecting the hotel, I have to display the unavailable dates of the hotel in the jQuery datepicker as disabled. This is the Jav ...

The original items are not utilized by jquery-ui autocomplete

I currently have the following setup: class Team { constructor(data) { this.id = data && data.id || null this._title = data && data.title || null } get title() { return this._title } set title(v) { this ...

Can a button be connected to both navigate to another webpage and trigger a modal to appear on it simultaneously?

Is there a way to connect a button to a modal on a different page so that when the button is clicked, it opens another page (in a new tab with target 0) with the modal already displayed? ...

Count the number of times an iteration occurs in AngularJS/JavaScript

I need assistance with my code snippet below, as I am trying to determine the count of all instances where $scope.rm is equal to "failed" or when $scope.percentage is less than 50. angular.forEach(result1, function (value, key) { $scope.percentage ...

An innovative approach to incorporating multiple patterns into HTML input using markup alone, without the need for JavaScript

Input fields are currently set to accept phone numbers in the format 555-555-5555 using the pattern [0-9]{3}-[0-9]{3}-[0-9]{4}. Is it possible to modify the pattern to also allow phone numbers in the format of 5555555555? <input type="tel" cl ...

`AJAX jQuery for efficient file uploads`

I am struggling to upload a file input using jQuery ajax without causing the page to refresh. Here is my HTML form: <form name="uploadform" id="uploadform" method="post" enctype="multipart/form-data"> <div name="profileBiodata" id="profileBioda ...

What is the best way to adjust a map to completely fill the screen?

I am experiencing an issue with my Openlayer map not fitting to full screen automatically. Despite trying various settings, I am unable to resolve this issue. Can anyone suggest what might be causing this problem? Thank you in advance https://i.stack.imgu ...