Exploring Bootstrap and its focus on creating responsive designs

The query

I recently completed a website for a local sports community using bootstrap v4. While most of the website is finished, I am currently focusing on adjusting the media breakpoints to ensure responsiveness. However, I have encountered a few issues:

1st Determining the appropriate breakpoints

I am currently utilizing the following breakpoints:

/* Smartphones */
@media only screen and (max-width: 991px) {


/* Large devices */
@media only screen and (min-width: 992px) {

}

/* Extra large devices */
@media only screen and (min-width: 1200px) {}

I would appreciate feedback on their suitability.

2nd Centering an element

In addition to the main page, my website includes sub-pages. I aim to position the

<div class="text-container">
equidistant from the nav and footer, ensuring that the entire site spans the full screen without scroll bars (work in progress for mobile view on sub-page).

Specific sub-page requiring adjustment:

3rd Enhancing Bootstrap carousel for responsiveness

The carousel on this page features three images. However, on smaller screens, the carousel's images do not fill the entire viewing area.

My attempted solutions:

Regarding the 2nd issue:

top: 50%;
-ms-transform: translate(-50%);
transform: translate(-50%);
margin-top: X%;
margin-bottom: X%;

Concerning the 3rd aspect:

height: 100%;

height: 100vh;

Code Reference

You can access the code at the provided URLs. The primary CSS file is style.css, while sub.css caters to sub-pages, and columns.css defines the .col-x classes.

Answer №1

Revise the following code for the third point:

<div class="carousel-inner">
    <div class="carousel-item active" style="background-image:url(./assets/img/carousel/1.jpg);"></div>
    <div class="carousel-item active" style="background-image:url(./assets/img/carousel/2.jpg);"></div>
    <div class="carousel-item active" style="background-image:url(./assets/img/carousel/3.jpg);"></div>
</div>

Answer №2

Kindly insert the following codes..

styling with CSS

.text-style {
    margin: 20px 10px;
}

Update in HTML Please do not use the "col-100" class at the bottom of the page

<div class="row"></div>
<div class="row"></div>

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

Show and hide a division based on the status of a checkbox

I have a specific requirement regarding authentication modes. When selecting a single factor, only one type of authentication mode can be chosen at a time and the corresponding div will be displayed. However, when selecting multiple factors, I should be ab ...

Exploring the jungle. Cursor acting strange while dragging

I am currently working on implementing drag-and-drop functionality in my project, utilizing slip.js from slip.js. To enhance the cursor during dragging, I have assigned class="draggable" to each draggable <tr>. The CSS code for this class is: .drag ...

Distinguishing between the col and row classes in Bootstrap, as well as understanding how to create an empty

I am unsure about something. I am using Bootstrap v4.1 and I believe the following code is correct: <div class="container"> <div class="row"> <div class="col-sm-6"> Dog </div> ...

Display a div in front of another using Material UI when hovering

Is there a way to display a black transparent div in front of a <MediaCard/> when hovering over it? Below is the code snippet I am using with Material UI: <Box> <Typography variant='h3'>Home Page</Typography> < ...

What is the significance of the .jpg?t= in the URL?

This webcam image displays the code ?t=1512496926. What exactly does this code signify? Could it be related to time? Is it just a random string of characters? https://i.stack.imgur.com/ZAZMy.jpg ...

Is it possible to have dual images as the background for an HTML div?

Is it possible to use two images for a DIV background in CSS? I have one image that is just the background color and another that is a logo. Here's the code snippet I am currently using: .header{ background-attachment: scroll; background-clip ...

Error: Attempting to access the 'main' property of an undefined object - React dilemma

For my React webpage, I decided to create a theme using createMuiTheme from material-ui, and here is the palette I defined: palette: { primary: { main: "#333333" }, secondary: { main: "#727171" }, background: { paper: " ...

Attempting to apply the 'Tw Cen MT Condensed Extra Bold' typeface using CSS styling

I'm having trouble getting the 'Tw Cen MT Condensed Extra Bold' font to work in my website header. Even when I try to style it with bold, it just doesn't look right. I created the banner in Photoshop and now I want to recreate the text ...

What is the best way to expand my navigation bar to fill the entire width of my div?

A big shoutout to @seva.rubbo for fixing the issue! Check out the updated code on JSFiddle I recently designed a layout with a fixed width div of width: 900px;. I centered this div, leaving blank spaces on either side. Now, I'm looking to add a navig ...

The close button on the modal is malfunctioning

I am currently facing an issue with a simple modal window that opens when a link is clicked and should close when the user clicks on the close button, represented as a red rectangle in my fiddle. You can access my fiddle through this link Below is the re ...

Trouble arises when implementing personalized buttons on the Slick JS slider

Are you struggling to customize buttons for your Slick Slider JS? I am facing a similar issue with applying my own button styles to the slider. I am interested in using arrow icons instead of the default buttons. Here is the HTML code snippet: <secti ...

Employing an odd/even toggle for assigning class names

I need each this.state.title to be aligned based on a different classname. I attempted using css flex boxes/nth-of-type/nth-child, but it didn't work well with React. I'm utilizing this.state to access my objects. My failed strategy render: f ...

Start the CSS3 animation in reverse right away

I am trying to achieve a "flashing" effect by adding the .shown class to my #overlay, causing the opacity to fade in for 2 seconds and then immediately reverse, fading out for another 2 seconds. After experimenting with removing the class, I found that it ...

What is the best way to conceal a specific class of DIV within a container, and how can I also hide another DIV within the same container by

I have a DIV class containing around 10 elements within a container. I am looking to implement a feature where these elements are hidden and shown one by one every 15 seconds using jQuery with a smooth fadeOut() effect. Your assistance in achieving this wo ...

Two adjacent divs positioned next to each other, where the right-hand div occupies the remaining space within its

I am facing a common issue with two side-by-side divs, which I usually solve without any problems by floating both divs left and adding a clear:both div after them. However, my requirements have made this problem more complicated to solve... What I would ...

Can one select a radio button without corrupting the data in VUE?

How can I preselect a value for radio buttons created using Vue's List Rendering without having a dataset in the script? Below is the code snippet for a better understanding of my goal: SCRIPT: data() { return { formData: {} //formData st ...

Fine-tuning the flexbox grid layout for various screen sizes, both big and small

Two different layouts were created. The first layout is designed for medium & large screens, while the second one is tailored for devices with a maximum width of 736px. Check out the vanilla implementation using flexbox (without mobile adaptation) Here ...

I'm having a hard time understanding how to use array_filter()

<html> <style> h1 { text-align: center; } div { text-align: center; border: 1px solid; padding: 20px; width: 520px; margin: 0 auto; } table{ text-align: center; border: 1px solid; padding: 20px; width: 5 ...

Determine if the html element is wrapping to a new line when zoomed in or when the text size on Windows is increased

My webpage has 2 labels displayed side by side, but due to the system text size being set at 150% (which is recommended) in Windows, the second label does not have enough space and gets pushed below the first label. I am looking for a way to determine if t ...

Storing the chosen item in a PHP drop-down menu

Is there a way to keep the selected value of a drop down when submitting a form with an onchange event? This is my current code: echo "<form method=\"post\"> <select name=\"Color\" OnChange=\"this.form.submit();\"&g ...