Avatar of altariamx2003
altariamx2003
Flag for Mexico asked on

how to resize an image changing the size resolution of the page

I found this pages: http://www.altaour.com and http://www.fiftythree.com/paper

If you change the size resolution of your browser you will see that the the image remains in the center.

And also if you increase the size resolution of your browser you will see new parts of the same image

I would like to know how to do that to my page.
CSSJavaScriptHTML

Avatar of undefined
Last Comment
Kyle Hamilton

8/22/2022 - Mon
Kyle Hamilton

it's a background image with centered positioning.

something like this:

.container{

   background:url(big-image.jpg) center center no-repeat;
   width:100%;
}
altariamx2003

ASKER
I tried that but the background image remains in the same place no matter what wich resolution I use

check this:

resolution: 1920x1080
resolution: 1920x1080

resolution: 1280x720
resolution:1280x720
as you can see with the lower resolution the background image remains in the center of the screen


I would like to do something like that
altariamx2003

ASKER
could this workk???

.container{
   background : url(big-image.jpg) no-repeat fixed center center transparent;
   
   width:100%;

}

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Kyle Hamilton

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
altariamx2003

ASKER
it works!!

thanks!!!
Kyle Hamilton

:)