Resizing objects within a section to conform to the section's dimensions is not possible in CSS/HTML

I'm facing some challenges with responsiveness on my landing page.

Utilizing the scrollify jQuery library, users can skip between different sections of the landing page on click or scroll.

However, when switching to landscape orientation on mobile devices, the objects in the sections overlap.

Here is a snippet of one of the sections:

.inner2 {
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.centerwraper {
  position: relative;
  height: auto;
  margin: 0 auto;
}
.centerdiv {
  margin: 0 auto;
  text-align: center;
}
.coltitle {
  width: 50%;
}

.colimage {
  width: 90%;
}
<section class="panel OriginalCollection" data-section-name="OriginalCollection">
    <div class="inner2">
        <div class="stripe">
            <br>
        </div>
        <div class="centerwraper">
            <div class="centerdiv">
                <img class="coltitle" src="img/original_header.png" />
            </div>
            <div style="width: auto">
                <div class="centerdiv">
                    <img class="colimage" src="img/original_bottles.png" />
                </div>
                <div class="centerdiv">
                    <div style="padding-left: 30px" class="descriptions">
                        <p2>
                            The real MVP of the fruity
                            <br> flavours. Perfect for those
                            <br> looking for a one of a kind taste
                            <br> sensation. A true
                            <br> mouth-watering fruit explosion
                            <br> that your taste buds have
                            <br> been waiting for.
                        </p2>
                    </div>
                    <div style="padding-left: 60px" class="descriptions">
                        <p2>
                            A top secret recipe that can
                            <br> only be described as the daddy
                            <br> of all day vapes. A fruity
                            <br> undertone and a cool crystal
                            <br> after sensation that will leave
                            <br> you wondering what it is...
                            <br> and wanting more.
                        </p2>
                    </div>
                    <div style="padding-left: 80px" class="descriptions">
                        <p2>
                            Packed with one hell of a bite.
                            <br> This flavour is crammed with
                            <br> sweet red cherries blended
                            <br> perfectly with fresh picked
                            <br> forest fruits. The fruity taste is
                            <br> then entangled beautifully with
                            <br> sweet eucalyptus and aniseed.
                        </p2>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

Furthermore, users need to refresh the website to adjust section sizes correctly if there are changes in size (e.g., orientation change requires a page refresh for proper section sizing).

Answer №1

To ensure responsiveness, make sure to add the viewport meta tag in the header of your website.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

If the link you are using does not have this tag included, it could be causing issues with responsiveness. Adding the viewport meta tag can help resolve this issue.

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

What is the best way to specify option values for selection in AngularJS?

...while still maintaining the model bindings? I currently have a select menu set up like this: <select class="form-control" ng-model="activeTask" ng-options="task.title for task in tasks"> </select> When an option is selected, it displays s ...

Ruby Thin Server: An Unexpected ActionView Template Error

Encountering an issue when trying to deploy my project on Amazon Web Services and accessing the domain. ActionView::Template::Error (Command 'java -jar /home/ubuntu/.rvm/gems/ruby-2.1.10@silk/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8 ...

Transform the array into an associative array

Below is the array I am working with: print_r($data); When printed in PHP, the result looks like this: $data=Array( [0] => stdClass Object ( [name] => location [value] =>lko ) [1] => stdClass Object ( [n ...

Use a foreach loop to iterate over an array of dates and display them in individual tables

I am currently working on structuring my foreach loop to iterate through all the dates in my time stamp arrays. The goal is to display the results in 5 separate tables, each pertaining to one of the dates. Below is the function I've implemented to re ...

If a user types in Korean characters in the input field and then clicks away to any other part of the screen, the input field will automatically regain focus

jsfiddle instructions for testing: type Korean characters in the input field scroll down until the input field is no longer visible Click anywhere on the screen Expected result: the input field will come into focus with (Korean text) If the user enters K ...

After trying 'use client', useEffect(), and disabling Next/Dynamic SSR in NextJs 14, the window object remains undefined

My folder structure is set up for a page that uses client-side components, with a focus on "hero.jsx". Click here to see the image description. In the main page, 'page.jsx', I've imported all these components while ensuring they are not ser ...

Continuous updates triggered by mouse movement with jQuery

Can someone help me figure out why my custom description isn't following my mouse pointer during the 'mousemove' event on an image? I've provided the HTML code below: <!DOCTYPE html> <html lang="en> <head> ...

Guide on integrating a JavaScript file for user scripts into a Chrome extension

Lately, I've been working on creating user scripts for Chrome that can operate without relying on Tampermonkey. Recently, I integrated a third-party extension (a userscript js) into my Chrome extensions: // ==UserScript== // @name "job changer" ...

Incorporating a protected Grafana dashboard into a web application

I am looking to incorporate Grafana into my web application using AngularJS. The main objective is to allow users to access the Grafana UI by clicking on a button within my application. Setting up an apache reverse proxy for Grafana and ensuring proper COR ...

Incorporate time zone awareness to JavaScript date objects

Whenever I create objects in my MongoDB using Mongoose, the dates are displayed in the format of, for example, 2016-10-10T15:35:52.764Z (alternatively, it could be yyyy-MM-ddTHH:mm:ssZ). When I utilize Date.now() in JavaScript, I am given a timestamp. Is ...

Transmitting the values of my CheckBox list to a JSON file

Here is an interesting question that I have encountered. I created a drop box list using ng-repeat. Take a look at the code below: <ul> <li ng-repeat="item in formLIST.ContractType"> <input type="checkbox" ng-click="checkItems(item)" ...

The Faux-Dynamic News Feed on a stationary website

As I work on revamping my employer's static website, it has become clear that a news section needs to be integrated. The site is being built using the Bootstrap 3.0 framework. My plan is to implement the following strategy: I aim to have a JavaScrip ...

The Impact of CSS Border Width on the Size of a PHP Form

Creating a PHP form with a tabbed box has been quite the challenge. With 3 tabs, each requiring different field inputs, I set out to add a border around the form headings and tabs. The border looks great, but it poses a problem - its width spans the entire ...

How to pre-select a default value in mat-select using Angular Material

Currently, I am working with Angular 7 along with the usage of Angular Material. My intention is to set a default value for my select input field. Unfortunately, it seems like the default value is not being applied as expected. <mat-select required [( ...

manipulating elements of an array within a .map method

i am stuck with a json exporting database. it generates json data in the following format. {"Drinks":[ { "name":"name", "discription":"discription", "image":"image", "ingredients&qu ...

Transform the retrieved binary data into an object and then send it back

I have been working on a React function that fetches a .csv file stored in S3. The function reads the blob within the file, converts it to an object, and then returns it: import { Storage } from "aws-amplify"; import Papa from "papaparse&quo ...

What is the reason that the keyword 'in' does not function for verifying the presence of a particular word within an array in JavaScript?

Currently, I am focused on string manipulation for a chatbot. My main objective is to identify a specific word within a returned string message. Here is an example of my approach: let msg = 'how are you?' //An illustration of ...

Most efficient way to use JavaScript to filter a checkboxlist

Our project does not require the use of any javascript libraries such as jQuery, Dojo, or Prototype so finding a solution may be more challenging. I am looking for detailed answers to this question explaining how it can be accomplished. As many of you may ...

linking in Ruby on Rails

I'm facing a bit of confusion with something that may seem minor: Could someone guide me on how to create a hyperlink from one ruby-file.html.erb to another? ...

Is it possible to utilize Vue.js' v-if directive to validate if a certain value is present within an array

In my form, I have a checkbox and I want to be able to use v-if directly to display or hide sections based on the selected checkbox values. Can this be done using v-if, or do I need to use watch:? ...