The cards in the Bootstrap layout stack on top of one another when viewed on a mobile screen

I have a "flipping card" and another bootstrap 4 card positioned side by side. However, when tested on a mobile screen using Chrome's dev console, the second card overlaps the flipping card and covers it completely.

To provide some context, I've structured the code within container, row, and col-md-* as shown:

<div class="container">
   <div class="row">
      <div class="col-md-4">
      </div>
      ....
      <div class="col-md-8">
      </div>
   </div>
</div>

If you need to refer back to my full HTML and CSS code, here is an excerpt of it:

    <!-- start of third block -->

    <div class="thirdblock">

            <div class="container">

                <div class="row">

                    <div class="col-md-4">
                        <div class="card-container">

                            <div class="card">
                                <div class="front">
                                    <div class="cover">

                                    </div>
                                    <div class="user">
                                        <img class="img-circle" src="images/...jpg" />
                                    </div>
                                    <div class="content">
                                       .
                                       .
                                       .

                                

                        </div> <!-- end col-md-4 -->


                    <div class="col-md-8">

                       
                             .
                             .
                             .

                        </div>

                    </div><!-- end row -->



</div> <!-- end container -->

</div>

<!-- end third block -->

For further details regarding the issue, please check the extensive CSS code below:

.thirdblock {
    padding-top: 50px;
    padding-bottom: 50px;
    height: 100%;
    font-family: 'Arima Madurai', cursive;
    background-image: url("../images/image.jpg");
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.card {
     .
     .
     .     
   
}

/* Additional styling and flip card code are included in the CSS for reference */
    
    

If anyone could assist me in identifying where I may be going wrong with my implementation, I would greatly appreciate it.

Answer №1

Simply include a specific height for the .card class. This is necessary due to the absolute positioning of the .front and .back classes, which prevent the card class from naturally taking on any height.

.card{
height:362px;
}

Answer №2

Eliminate the CSS code for classes .front and .back

 /* position: absolute; */
    /* top: 0; */

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

Issue occurred in ajax function when trying to present data in a form

I am encountering an issue while trying to fetch data from the database and display it in my form. The error message I'm getting is VM1704:1 Uncaught SyntaxError: Unexpected end of JSON input. In my PHP file, I have retrieved the data from the databas ...

Tips for efficiently removing a user as an administrator

Whenever a user logs in or registers, I save their session and cookie information and also add certain details to the database. Login/Register Module (login/register.php) $_SESSION['userid'] = $userid; $selector = base64_encode(random_bytes(9)) ...

Create a design where two columns can be scrolled independently and extend to fit the height of the viewport

I have successfully created a JS Fiddle that demonstrates exactly what I am looking for: http://jsfiddle.net/j7ay4qd8/5/ This Fiddle features two columns that can be scrolled separately, and different sections of the left column can be easily scrolled to ...

Tips for choosing only certain CSS selector declarations

Although I am primarily a PHP developer, I recently encountered an issue while developing a Joomla component. When installing my component on different Joomla websites, it also inherits the CSS styles of the parent template, which is causing some unwanted ...

Having trouble with Cordova.js not functioning on my Android device while using PhoneGap

Currently, I am working on developing an app using cordova.js phonegap. For the app, I have set an external URL to load when it launches. super.clearCache(); super.loadUrl("http://EXTERNALURL.COM/"); Within the index file, I have included the following: ...

The sequence of HTML attributes

Could there be a subjective angle to this question (or maybe not)... I work on crafting web designs and applications using Visual Studio and typically Bootstrap. When I drag and drop a CSS file into an HTML document, the code generated by Visual Studio loo ...

Foundation Unveil Modal hidden from view

I'm currently integrating modals using Foundation 5 in a Rails application. The issue I'm facing is that the modal only works when the page is not scrolled down. If you scroll to the bottom of the page and try to activate the modal by clicking ...

What steps can I take to get a border functioning correctly on my website?

For my friend's birthday, I am designing a website that resembles a greeting card. The layout consists of text in the center and an image of a birthday cake. To give it a card-like feel, I want to create a border around it. Although I know how to adju ...

What are some ways to align text both vertically and horizontally within columns?

How can I center text both vertically and horizontally inside two columns using Bootstrap 4? <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"> <div class="row"> <div class="co ...

Attempting to link two JavaScript files, however, only one of them is functioning correctly

I'm currently experiencing an issue with my HTML page that involves calling two JS files for two different image sliders on the same website page. One slider works perfectly fine while the other does not. I'm confused as to whether it's perm ...

Trouble arises when trying to link IE7 with jQuery

I am currently testing a website with jQuery. There is a plugin that, when hovered over, slides down to reveal another banner, subsequently sliding the banner below it down as well. I have added a link on the bottom banner using z-index, and although it wo ...

Display up to five pictures at a time and then rotate to the next set when ten pictures have been

I have been using the marquee tag to display pictures, but I'm having an issue where only 5 out of the 10 pictures are being shown. Here is the code I am currently using: <marquee align="right" behaviour="alternate" scrollamount="4" direction="lef ...

Strategies for transferring data from index.html to component.ts in Angular 4

Greetings, as a newcomer to Angular, I am seeking advice on how to link my Index.html file to component.ts. Please review the code snippet below where I have created a function called scannerOutput in my Angular index.html file which is functioning properl ...

The Reactstrap NavDropdown feature is refusing to open

As a newcomer to the world of React, I am currently exploring how to utilize React and Reactstrap for an internal project at my workplace. After dedicating numerous hours to figuring out how to make the NavDropdown component function properly, I attempted ...

Guide to ensuring the navbar remains at the top of the webpage following an image

I am attempting to create a sticky navbar that stays at the top of the page once the header has been scrolled past. It should have a similar effect as shown in this example on codepen.io, but with the addition of an image that stretches across most of the ...

What is the best method for getting rid of blank white space on my website?

Having some trouble removing unnecessary white space on my website. The goal is to have the main text and logo centered on an image background, but I've been unsuccessful so far. I've experimented with different CSS properties like overflow-x: ...

Why is a question mark added to the URL when the login button is clicked

I've encountered an issue where clicking this code for the first time redirects me to localhost:8080//? instead of localhost:8080//admin.html. Any idea why this is happening? $("#admin-login").click(function(){ var data = {"username": $("#admin ...

What changes can be made to the code in order to prevent the Highcharts graph from overlapping with the fixed navigation bar located at the top of the page

I am looking to create a navigation bar that stays fixed at the top of the page. I followed the approach outlined on the w3schools website to achieve this. However, when I add a highchart javascript graph to the page, the fixed navigation bar stops workin ...

What is the best way to store items in localStorage within Angular version 4.4.6?

I have been working on implementing a basic authentication system in Angular 4.4 with MongoDB as the backend database. login.component.ts import { Component, OnInit } from '@angular/core'; import { AuthService } from 'app/services/auth.ser ...

What is the process of generating clozed text using HTML and CSS?

Is there a method to conceal text and create an underline of identical length in an HTML document? In this technique, certain highlighted words remain hidden, substituted with underlines that match the original text's length precisely. Additionally, a ...