Troubleshooting Problem: Grid Layout Problem with Thumbnail Images in Responsive Image Gallery

I stumbled upon a fantastic example of a responsive image gallery that I'm eager to incorporate into my website:

Although I'm using Mobirise to set up the gallery, I'm struggling to replicate the layout of the sample gallery - specifically, having the first two images stacked vertically in one column and the second column containing just one image with a height equivalent to the first two images combined.

When I attempt to resize images in an HTML editor, it results in overlapping with other thumbnails.

.mbr-gallery .mbr-gallery-item {
  position: relative;
  display: inline-block;
  width: 25%;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mbr-gallery .mbr-gallery-item {
    width: 50%;
  }
}

@media (max-width: 400px) {
  .mbr-gallery .mbr-gallery-item {
    width: 100%;
  }
}
...(remaining CSS and HTML code)

Answer №1

This code snippet has been created on Codepen. I hope it meets your requirements! Feel free to reach out if you need more details.

The code featured in the description is specifically designed for the second column image to prevent it from stretching and fill the container adequately.

For quick access, here is the link to view the code on Codepen: Codepen

.fill{
    height: 100%;
    width: 100%;
    object-fit: cover;
}

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

Remove the background color from a semi-transparent circular CSS div when it is being dragged

My circular div is being dragged for a drag and drop operation, but there's always a translucent square around it. How can I remove this unwanted effect? body{ background : #BBD1DF; } .dragdemo { width: 170px; height: 170px; line-hei ...

How can I make the scrollbar invisible in the sticky header of a Material UI Table?

In my React project, I have implemented a Material-UI Table with a fixed header. The issue I am facing is that the scrollbar in the table header overlaps it and I want to hide it while still displaying it in the body of the table. I have attempted to modi ...

Checkbox for selecting all or none inside column filters in a jQuery datatable

Within a jQuery datatable, I am facing an issue with multi-select filters in a checkbox column. Each filter has a 'Select All / None' checkbox at the top. While I can select all checkboxes within a specific container, the problem arises when the ...

Create an HTML form that sends email notifications using a third-party form backend platform

I recently designed a form using Webflow and integrated it with Getform.io for the backend platform. Everything is running smoothly, including data collection and file uploads. However, I now want to enhance the form by enabling it to automatically send ...

Utilizing jQuery to manipulate dynamic elements on the DOM

Struggling to dynamically generate HTML using jQuery and facing challenges with adding a nested loop to generate specific target HTML code. The target HTML code is as follows: <div class="daily-featured__video-social"> <ul class="share-tools_ ...

Looking to center the numbers in my ordered list within a border box - any tips on how to achieve this?

I'm attempting to create a numbered order list with a circular border around it. The goal is to have the number of the list item centered within the circular border and the entire circle centered within the paragraph. Currently, both the number and th ...

The differences between using the opacity attribute in HTML and the opacity property

There are two distinct methods for adjusting opacity in HTML: <div opacity="0.5"></div> and <div style="opacity: 0.5;"></div> I am familiar with setting these values in JavaScript as well: div.setAttribute("opacity", 0.5); and ...

What is the best way to format MySQL table data into rows and columns for display?

<?php mysql_connect('server', 'user', 'Pass'); mysql_select_db('add'); $query =mysql_query('select * from addimage'); while( $row = mysql_fetch_assoc($query) ) { echo "$row[url]"; } ?> This code ...

Enhance user experience with a dynamic Bootstrap combo box that updates based on

I am currently facing an issue with the bootstrap combobox plugin. I am having trouble changing the selection and sending that information from the view to the controller. $('#MyCombo').on('change', function () { var data = $(this) ...

Showcasing a dynamic image as a task is being completed within a JavaScript function

Is there a way to show a loading image while waiting for a JavaScript function to finish? <script type="text/javascript"> function create() { //Perform operation } </script> I am looking for a solution to display a loading image until ...

Embracing the balance of a gradient backdrop

I'm looking to create a gradient background for my page that transitions from light blue in the center to dark blue on the sides in a symmetrical way. I've tried using a linear gradient that goes from left to right, but it doesn't achieve th ...

Improper layout on laptop screens with smaller dimensions

The design looks great on a 24-inch laptop, but on an 11-inch screen, the layout becomes distorted. The right column shifts down... Check out the layout here Below is my code: <div class="row" style="margin-left: 325px;"> <div class="span12 ...

Modify the contents of the 'data-content' area in the popover

Looking for a solution where I can update only a portion of the data-content within a popover. Here is an example code snippet: <div class="popover-wrapper"> <i class="glyphicon glyphicon-question-sign hover_content" ...

Use jQuery to swap out images and witness the image loading in real time

Currently, I am using jQuery to dynamically change images by using the code $('img').attr('src','newUrl'); However, whenever I do this, the image is only displayed once it has completely loaded. Due to my slow internet conne ...

CSS Troubleshooting: Error in Outlining When Using Block Display

I am attempting to create a combobox using HTML and CSS where each item is displayed on a separate line and lights up blue when hovered over, similar to Google's design. The basic setup is simple. I have a div with links (a) inside, and each link is s ...

Sending a JSON array to a WebMethod

I encountered an issue when attempting to convert an object to a JSON array as a string, resulting in an Internal Server Error. Fortunately, the GetServerTime method is functioning properly. My goal is to send an array of objects to the server and conver ...

Issues with PHP login/logout functionality found - PHP

My login/logout php code is not displaying correctly in my navigation bar. I want the navbar to show 'logout' when the user is logged in, and vice versa. On top of my header.php page: <?php session_start(); require "includes/dbh.inc.php" ...

Looking for assistance in creating a unique jQuery validation function tailored to your

Looking at my form attribute, it appears as follows: onsubmit="return validateForm(this);" Additionally, I have a jQuery function set up like this: function validateForm(form) { $(form,"input").each(function() { if($(this).length < 1) { ...

The utilization of the Open Sans font family results in certain alterations to the user

Currently, I am working on developing a button widget using react. I have utilized the 'Open Sans' font family for the HTML body in order to maintain consistent UI styling. However, some of the styling elements break down when the 'Open Sans ...

Having trouble implementing Bootstrap Progress Bar with AJAX in webpy

I am currently working on a web application using webpy and dealing with a Bootstrap progress bar in the template HTML file. To update this progress bar dynamically, I aim to utilize jQuery AJAX calls to fetch data from the server. In order to achieve thi ...