Site logo

Archived topic

adjusting the width of div to the container

5 replies · Started by Gerhard on May 28, 2022

Viewing posts 1–6 of 6

Hello,
how can I adjust the width of the div which shows on hovering the years (see link) to the width of the grid-container (1600px) ?

Greetings from Cologne
Gerhard

Hi there,

do you want to contain the width of the Image ? If so, change this CSS:

.chrono-bild img {
    width: 100%;
    position: fixed;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    z-index: -20;
}

to:

.chrono-bild img {
    width: 100%;
    position: fixed;
    height: 100%;
    max-height: 100%;
    max-width: 1600px;
    object-fit: cover;
    object-position: 50% 50%;
    z-index: -20;
    left: 50%;
    transform: translateX(-50%);
}

Thank you, David!

I helped me by changing the footer's and header's width in the customer.

But your solution is what I was looking for.
Greetings from Cologne
Gerhard Weber

Is that resolved ?

Oh yes, thanks a lot, David!!!

Glad to hear that!

This archived topic is closed to new replies.