Picture remains unchanged in Chrome

I'm struggling to understand why my images do not resize when I shrink or resize my Chrome window. Can someone help me out with an explanation? I've been trying for some time now but still can't seem to crack it, and I haven't found the answer anywhere else. The image shrinks in Firefox when running on my localhost, but it's not behaving on jsfiddle either. And unfortunately, it's still not working in Chrome (57.0.2987.110).

<div class="page">
<div class="container">
    <div class="title">
        <H1>FLEXBOX PRACTICE</H1>
    </div>
    <div class="content">
        <div class="text">
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur.</p>
        </div>
        <div class="images">
            <img src="http://www.placebacon.net/1280/720" alt="Bacn">
        </div>
    </div>      
</div>

body {
    margin: 0;
}
p {
    margin: 0;
    padding: 0;
}
h1 {
    font-size: 72px;
    margin: 20px 0;
}
.page {
    width: 100vw;
    height: 100vh;
    background-color: pink;

}
.container {
    margin: 0 auto;
    width: 80vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.content {
    display: flex;
    justify-content: space-between;
    height: 80vh;
    width: 60vw;
    align-items: center;
    background-color: salmon;
}
    .text {
        flex-grow: 0;
        padding: 10px 20px 10px 20px;
        background-color: red;
        color: white;
        border-radius: 10px;

        width: 340px;
        font-size: 24px;
        font-family: verdana;
    }
    .images {
        display: flex;
        align-items: center;
        flex-grow: 1;
        flex-shrink: 1;         
        max-width: 600px;
        width: 600px;
        background-color: yellow;
    }
        .images img {           
            display: flex;
            flex-grow: 1;
            flex-shrink: 1;
            max-width: inherit;
            width: inherit;
        }

https://jsfiddle.net/xb4obfce/

Answer №1

The image is instructed to adapt the width of its container, set at 600px.

By updating the .images class with width: 100%; it will become responsive.

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

The Owl-Carousel's MouseWheel functionality elegantly navigates in a singular, seamless direction

Issue at Hand: Greetings, I am facing a challenge in constructing a carousel using Owl-Carousel 2.3.4. My goal is to enable the ability to scroll through my images using the mousewheel option. Code Implementation: Incorporating HTML code : <div style ...

Selenium can be used to locate elements between two specific spans

I'm on a mission to locate specific text within this HTML code using Selenium <span class="value"> Receiver 1 <br> </span> Is there a way to make it more straightforward, like perhaps using span[class=value]? ...

Responsive Line Breaks in Bootstrap 4

I can't seem to find any information in the documentation to guide me in the right direction here. I'm hesitant to use columns as it could result in gaps between the text. Currently, I have the date displayed at the top of my website like this u ...

Fiddle demonstrates HTML functionality, while local testing is unsuccessful

Currently, I am in the process of creating an image slider and attempting to run it on my personal computer. However, upon doing so, I have encountered a problem where the page is not rendering correctly. Additionally, I receive an ActiveX warning message ...

Enhancing an image with zoom effect in a 2-column layout on hover

Could someone help me achieve a 2-column layout where the left column contains text and the right column an image? I want the image in the right column to zoom when the user hovers over either the left or right column. The issue is that when the user hove ...

What is the process to create text in bold format in an HTML document?

I'm having difficulty making certain text bold with HTML. Unfortunately, I can't seem to figure out the correct method. Here is my attempted code snippet: Some <bold>text</bold> that I'm trying to highlight. Could someone prov ...

The alignment of text in the flex column is incorrect on the right side

The flex column I created is having an issue with the arrow on the right side. It's not displaying properly and is hidden. The arrow should be similar to the one on the left and point to the left direction. I have used left: 0; for the left side and ...

Centralized navigation bar

I am currently facing a challenge with centering my nav bar and I'm not sure how to proceed. The nav bar is placed within a class and a div, which is causing confusion for me. I have attempted to align it to the center and also tried using float:cente ...

The source map failed to load in DevTools

So many threads talk about these Chrome dev tools warnings. The common solution is to disable notifications for "Enable javascript source maps" and "Enable CSS source maps". What I really want to know is how to RESOLVE this and what's causing these w ...

Issue with displaying website monitors

I am facing an issue with my website where it displays differently on various monitors. Below is the HTML and CSS code snippets: HTML <body> <div id="Links"> <a href="About.html"><img src="Slideshow/About.png" width="140em" />< ...

Transitioning backgrounds in a slideshow

I am attempting to create a unique slideshow effect for my page background by changing the image URL at specific intervals with a smooth fade in and fade out transition. However, I am faced with the challenge of figuring out the best way to achieve this. ...

Tips for inserting a footer at the bottom of every page during the conversion process from HTML to PDF

Could use some assistance with converting HTML into a PDF report. In particular, I want the footer to always appear at the bottom of the last page, even if there is minimal content on that page. Any suggestions? I've been utilizing the wkhtmltopdf to ...

Something seems off with Chrome

I am facing a unique issue that I need help with. Unfortunately, the code is too long to post here but essentially it involves creating a menu for a website. The menu works perfectly and looks great on all browsers except for Chrome. This is unusual as Ch ...

Unraveling CSS inheritance: A guide to overriding inherited styles

I need to make some adjustments to a WordPress template. One of the changes is to set the background color of an element to transparent. The wrapper div, which has the background color applied to it, contains many nested child divs that all inherit that co ...

What are the best practices for integrating PrimeVue with CustomElements?

Recently, I decided to incorporate PrimeVue and PrimeFlex into my Vue 3 custom Element. To achieve this, I created a Component using the .ce.vue extension for the sfc mode and utilized defineCustomElement along with customElements.define to compile it as a ...

I am having trouble getting bootstrap-icons to work in my Angular project and I'm eager to figure it out

I am having trouble incorporating bootstrap-icons into my angular project. Despite running the npm i bootstrap-icons command, I am unable to successfully add icons using icon fonts on my webpage. As a temporary solution, I have added the bootstrap icon CD ...

Ensuring uniform height of columns in Bootstrap

I want all columns following the first row with col-md-6 to have equal height, regardless of dynamic content (go to full page). <html> <head> <title>Page Title</title> <meta charset="utf-8"> <meta name="viewport" ...

Is there a way to prevent additional text from shifting down when hovering over my Nav bar?

I need help with my navigation bar design. I have successfully implemented a hover effect that increases the text size on hover. However, when the text size changes, the other links shift down slightly and push the remaining links to the right (except the ...

Enhancing the appearance of an Angular.js application

On the same page, there are two buttons - one for buying and one for selling. It appears that both buttons share the same HTML instance. This creates a problem when trying to style them individually using classes, ids, or other HTML-targeted selectors, as ...

Utilizing CSS and jQuery to align images in the center of the screen

I'm attempting to display a larger image when hovering over a thumbnail using jQuery and CSS. I have two images like this <td> <% if camera["is_public"] == "t" %> <img src="https://media.evercam.io/v1/cameras/&l ...