Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8476009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:03:33+00:00 2026-06-10T18:03:33+00:00

I do not display it as a thumbnail, but can CSS help compress the

  • 0

I do not display it as a thumbnail, but can CSS help compress the image of size 1000×1000 into an image of size 500×500?

My CSS for the image looks like this:

.images {
  background:url("image.png") no-repeat scroll; // this is a 1000x1000 sized image
}

How do I overwrite this? I do not want to have to generate another image of size 500×500.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:03:35+00:00Added an answer on June 10, 2026 at 6:03 pm

    You can use CSS3 background-size:

    .images{
        background:url("image.png") no-repeat scroll;
        background-size:500px 500px;
    }
    

    But that will resize the image AFTER it has been dowloaded. And the best way is resizing the image with PHP (or similar) BEFORE the user downoads it.

    If you can’t resize it server-side and you want it to be cross-browser, you could also use

    HTML:

    <div class="images">
        <img class="bg" src="image.png" alt="My image" />
        Content
    </div>
    

    CSS:

    .images{
       position:relative;
    }
    .images>.bg{
       height:500px;
       width:500px;
       position:absolute;
       top:0;
       left:0;
       z-index:-1;
    }
    

    (You can set both height and width but only one of them is necessary).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a thumbnail image you can click to open a full size image
Firefox requires xhtml extension for mathml but IE will not display pages with xhtml
My form views fine in IE7 and IE8 but FireFox does not display the
My code seems to run but it does not display the result any result
The answer should be returned but it does not display for some reason. I
i custom varnish 500 error page,but i found that it could not display chinese
Can anyone see why this would work in FF but not Safari? When I
I'm trying to display a big image file in a J2ME application. But I
My list is not display when I hover over it. For the top navigation
My website at http://derek.genevievehoward.com/ will not display in Firefox, even though the HTML and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.