What are some strategies for ensuring that this page is responsive across all screen resolutions?

Hey there, I'm a newcomer and experiencing an issue. The page is not responsive for 1366 and 1280 resolutions on PC, although it looks perfect on 1920 and mobile devices. Can anyone provide me with some guidance?

I attempted to add `contain` on `object-fit`, but unfortunately, that didn't resolve the problem. I suspect the issue lies with the width, however, I am struggling to find a solution without adversely affecting the layout on 1920 resolution and mobile phones.

Resolution 1366

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

.container1 {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.container1>div {
  padding: 0px 5px;
  max-width: 100%;
  height: 325px;
}

.container1 div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zgrade {
  position: relative;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  max-width: 745px;
  min-width: 428px;
}

.zgradeimg {
  width: 500px;
  -moz-transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.4s ease-in-out;
}

.zgrade:hover img {
  -moz-transform: scale(1.1);
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

@media screen and (max-width: 780px) {
  .container1 {
    flex-direction: column;
  }
  .container1>div {
    padding: 10px 5px;
  }
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b3d1dcdcc7c0c7c1d2c3f3869d829d80">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

<div class="container1">
  <div class="row justify-content-center">
    <div class="zgrade">
      <a href="zgradaA.html">
        <img src="https://via.placeholder.com/800" /></a>
    </div>

    <br>
    <div class="zgrade"><img src="https://via.placeholder.com/800" />
    </div>
  </div>
</div>

<div class="p-6"></div>

<div class="container1">
  <div class="row justify-content-center ">
    <div class="zgrade ">
      <img src="https://via.placeholder.com/800" /></div>
    <br>

    <div class="zgrade"><img src="assets/img/szgrade/zgradaD.jpg" />
    </div>
  </div>
</div>

Answer №1

By removing the Row code from the container, everything started working smoothly. It seems that the rows are only necessary for containing columns, which I don't have in this particular case. After removing the row class, all is well now. I am optimistic that it will continue to work without any issues :)

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

Checking the password entered using JavaScript and Regular Expressions

Working with the current system, we utilize a Password class that checks for certain conditions and throws exceptions if not met: public Password(string password) : base(password) { // Must contain digit, special character, or uppercase character ...

Steps for creating a clickable product item card throughout

I am looking to modify my Product Card design. Currently, there is a hyperlink named Buy at the end of the card that users can click on. However, I want to make the entire card clickable with another hyperlink so users do not have to specifically click on ...

Tips for deactivating a specific value or graying it out within the list of value items in a drop-down menu using <ng-selectize> or <options> in Angular 7

I am facing a situation where I have to dynamically generate a list of options for a dropdown menu in my Angular 7 application. However, I need to be able to disable specific options in the list based on certain conditions or flags. For example: I am disp ...

Utilize Python to extract a table from an HTML document

I would like to retrieve a table from an HTML file. Below is the code-snippet I have written in order to extract the first table: import urllib2 import os import time import traceback from bs4 import BeautifulSoup #find('table',{'class&ap ...

Transform the CSS identifier into a class

Currently, my CSS looks like this: #navlist li #current { color: #000; background: #FFFFFF; border-bottom: 1px solid #FFFFFF; } I want to convert the id #current into a class so that I can dynamically assign it to the correct li element. How do I ...

Adjust the position of a div when the div above it expands

Text is displayed with a toggle button for icons. Beneath the text, there's a pagination div with a top margin set to position it correctly below the text. However, even though it follows the text in the HTML, it appears at the left corner of the main ...

Efficient Management of Various Profile Picture Dimensions

In the process of developing a web application that utilizes a SQL back end to store data, one key feature is user profiles with profile pictures. These profile pictures will need to be displayed in two different sizes throughout the application (16 x 16 a ...

Guide to positioning a top navigation menu with dropdown items in the center using CSS: absolute positioning

I have implemented a pure CSS menu from this source on my website. It functions properly in the 'hamburger menu' mode, but I am encountering difficulties when attempting to center or right-align the menu in other modes. Despite trying various so ...

JavaScript has thrown an error stating that the function in my jQuery script is undefined

I encountered an issue Uncaught TypeError: undefined is not a function in my jQuery script. Here is the code snippet: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link re ...

Error: Attempting to assign a value to the 'firstData' property of an object that is undefined

I am encountering two identical errors in my service. Below are the details of my service and controller: Service code snippet: getData: function (dataRecievedCallback, schemeid, userid) { //Average JSON api averageData = functi ...

When using HTML and PHP, do note that the function mysql_fetch_array() requires the first parameter to be a resource and

I'm currently working on developing a feature for our website that allows users to search for banned usernames on our servers. The idea is to create a simple form where users can enter the username they want to check and then display any matching resu ...

Skip ahead button for fast forwarding html5 video

One of the features in my video player is a skip button that allows users to jump to the end of the video. Below is the HTML code for the video player: <video id="video1" style="height: 100%" class="video-js vjs-default-skin" controls muted autoplay=" ...

Tips for displaying specific HTML elements in AngularJS using ng-repeat and ng-if

I am working with some bootstrap HTML code that includes an ng-repeat function. <div class="row"> <div class="col-lg-4" ng-repeat="p in persons"> <img class="img-circle" src="images/{{ p.image }}" width="140" height="140"> < ...

The submit option fails to appear on the screen in the JsonForm library

I've been using the JsonForm library ( https://github.com/jsonform/jsonform ) to define a form in HTML. I have set up the schema and form of the JsonForm structure, but for some reason, the "onSubmit" function that should enable the send button is not ...

Using jQuery to properly align two tables

My challenge involves managing a large gridview within a scrolling container that has a fixed height. To prevent the header from scrolling along with the content, I placed the header in a separate section. This setup results in two tables - one inside the ...

In order to avoid conflicts, please update the version code of your APK as there is currently one with version code 1. How can I go about changing the version?

My attempt to upload an apk file on Google Play has hit a roadblock. The apk file was created using Unity3D. Google Play is giving me an error message stating that I need to use a different version code for my APK because a version with code 1 already exis ...

The click event will only be triggered when a specific div is clicked within the

Here is some code I am working with: document.onclick = function () { console.log("Hello"); } <div class="label-search">Click me</div> I am trying to make it so that the console.log only executes when I click on the div class="label-sear ...

A reliable approach for dynamically altering SVG graphics

It seems like IE10 does not support CSS transformations for SVGs, only attribute transformations. Here is an example: <svg><rect id="myrect" width="200" height="200"></rect></svg> setTimeout(function() { var r = document.getE ...

Transferring data from MySQL to ListView on jQuery Mobile by utilizing ajax

<div data-role="main" class="ui-content"> <ul data-role="listview" id="responsecontainer" > </ul> This specific HTML file belongs to me. var output = $('#responsecontainer'); $.ajax({ url: 'http://192.168.1.2 ...

Looking for a way to validate file uploads in WordPress Gravity Forms before final submission

Is there a way to incorporate pre-validation in WordPress gravity form to alert users if they upload a file with the wrong extension, such as something other than PDF? I currently have ajax="true" enabled in the gravity form shortcode to avoid refreshing t ...