Problems Arising with Bootstrap Media Queries on Smaller Tablets in Landscape View

I am currently using Bootstrap's standard media queries for my project and they are working perfectly, except for small tablets in landscape mode. I have included an image to demonstrate this issue. The problem seems to arise from the custom CSS that I have implemented for various sections of my page, such as margin-top. My client requested the use of non-square background images, which required a significant amount of custom CSS to center text on these images. Dealing with non-square images has been quite challenging, as I have never encountered this issue before. While attempting to align everything within these media queries, I found that it negatively affects other devices.

Is there any suggestion on how to resolve this issue? Would adding additional media queries be necessary to achieve perfect alignment across all devices?

I will only include my media query code and the pricing column code, as there is a lot of code for the entire website. I will also provide a link to the working website. As mentioned, the layout appears fine on mobile portrait, iPad portrait/landscape, and desktop, but there are alignment issues on small tablets or landscape mobile devices.

Website link

https://i.sstatic.net/XrJzO.png

// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767.98px) { ... }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991.98px) { ... }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199.98px) { ... }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
...

Answer №1

Do you need help with this particular issue? https://i.sstatic.net/WXUKn.jpg

After reviewing your code, it appears that the problem may lie in how breakpoints are set up. I have made a slight adjustment for medium screens. Please try using this CSS code specifically for medium resolutions—I tested it on a 600px width screen, but adjustments may be needed for lower breakpoints.

// Remove width from the .cards class and set height to 680px
.card {
    /* width: 17rem; */
    border-radius: 30px;
    height: 680px;
}
// Remove padding from the .card-body class
.card-body{
padding: 0;
}
// Remove margin from container-fluid
.container-fluid d-flex align-items-center price_container text-center{
margin: 0;
}

Outcome: https://i.sstatic.net/Cm9bN.jpg

Answer №2

After some experimentation, I discovered that including col-sm-4 on every card resolved the issue of overlapping elements.

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

Designing tables and adherence to WCAG 2 accessibility standards

I'm aware that WCAG 2.0 allows tables for layout purposes, but I keep encountering an error in achecker despite this: Error 245: Data table with multiple rows/columns of headers does not utilize id and headers attributes to identify cells Resolution ...

What is the best way to center the dialogue on a GMap embed?

After embedding a Google Map using the Google Map Embed feature, I noticed that the info dialogue is not centered by default. You can see an example of this here. I came across another website where the dialogue is centered on the screen by default. You ...

Internet Explorer 11 Freezes Unexpectedly with Dynamic SVG Components

Lately, I developed a unique SVG Icon control for the new html application at my workplace. However, our quality department started noticing that IE 11 would intermittently "crash" while using the application after its implementation. I'm not convinc ...

Delete the browsing cache in Internet Explorer from an external source

Currently, I am working on developing an ASP.NET application using Visual Studio. However, a persistent issue I am facing is that every time I launch the application, Internet Explorer caches certain CSS and JS files. This forces me to manually clear the c ...

Use jQuery to place the initial 3 elements within a div

Currently, I am dynamically pulling content into li elements using ASP.NET. My goal is to wrap a specific div class around the first 3 li items in the list only. Here is an example: <ul class="wrapper"> <div cl ...

5 Simple Steps for Adding a Value to a Popup Textbox Automatically

I want to send a value to another php page and then display the values. How can I achieve this? Here is the PHP code snippet: if(!empty($_POST["mytext"])) { for ($x=1; $x<=$a; $x++) { echo $txtLine[$x] = $_POST['mytext'.$x]; } } B ...

Unable to process form submission with AngularJS + Stormpath

I am facing an issue with form submission. Even though I believe that the login and password data are being sent correctly, nothing happens when I submit the form. I am attempting to submit the form without using ngSubmit because it is not feasible in my s ...

Guidelines for using a video as a background on half of the page

Is it possible to have a video background take up half of the screen on a homepage? Currently, I am using Bootstrap 4's grid system to divide the page and using html5 to implement the video. <div class="container-fluid"> <div class="row ...

unable to connect to the web service using webview

When attempting to call a web service or display an alert, I am encountering some issues: Here is the code from my activity: mWebView = (WebView)findViewById(R.id.webViewRootAciviy); mWebView.setWebViewClient(new WebViewClient()); mWebView.setWebChromeCl ...

Safari (mac) experiencing issues with loading material icons properly on initial attempt

Upon my initial visit to the website, I noticed that the font appeared distorted. https://i.sstatic.net/BtUxI.png However, when I right-clicked and chose "reload page", the fonts were displayed correctly. https://i.sstatic.net/3XUcA.png This issue seem ...

Add information from a filled data chart

I'm seeking your assistance with a challenge I am facing. In Form1.php, I have extracted data from the database (flock id, house, breed) which populates one table row. The issue is that this form involves two tables in the database. flock id, house, ...

What could be the reason for the inconsistent resizing behavior of this DIV container?

Upon viewing this demo, it becomes evident that there is an outer DIV containing an inner DIV on the left side with two inner SPANS. The challenge lies in positioning the two SPANS next to the DIV. If a line break (BR) is used to separate them, the width o ...

Tips for arranging buttons horizontally in Angular

After adding a third button, I noticed that the buttons were now displaying in a column instead of a row. html: <div class="creator-button-container" *ngIf="isCurrentUserTheChannelCreator"> <div *ngIf="isChannelE ...

Error encountered: The Bootstrap Carousel function is causing a TypeError as e[g] is not defined

I am attempting to build a dynamic bootstrap carousel using my json data, and I have implemented jQuery-Template for rendering. Essentially, I am generating the carousel slider on-the-fly from my json data with the help of jQuery-Template. Here is a snippe ...

Styling a list within a div using CSS

I have a CSS file that looks like this: .h_bg{ height:100%; background-size:auto 100%; background-position:center center; background-repeat:no-repeat; position:relative; } .h_bg h1{ width: 100%; position:absolute; line-heig ...

Ensure that the footer remains fixed at the bottom of the grid at all times

Hello everyone, I am trying to make sure that the black line in my footer always stays at the bottom, regardless of the size of the monitor. I am using a grid-based CSS. I'm not sure if the issue lies within the body? /* GRID BASED ([{"media":"defau ...

What is the best way to align an HTML DIV with a logo on the left side?

I am trying to position a div called #top_menu in the center of the page. <div id="top_menu">This is the menu and it is centered on the page</div> Here is my CSS code: #top_menu { margin: 0 auto; width: 600px; ... } Next to the top menu, I ...

Iterate through each field with getElementsByName to retrieve values triggering the onChange event

I am working on a contact form that includes inputs, selectors and radio buttons. Doubt 1: I am trying to figure out how to retrieve the index of a field using the getElementsByName method with the onChange event. Would a For Loop be the appropriate solut ...

Tips for changing a fullscreen HTML5 video appearance

I discovered a way to change the appearance of a regular video element using this CSS code: transform: rotate(9deg) !important; But, when I try to make the video fullscreen, the user-agent CSS rules seem to automatically take control: https://i.sstatic. ...

Differences in font sizes across various browsers on Mac devices

In the given scenario, a navigation bar is displayed. The elements of this navigation bar have varying widths, but when combined together, their total width matches that of their container element, which is the ul. The problem arises when viewing the navig ...