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 8503711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:49:50+00:00 2026-06-11T01:49:50+00:00

Okay so I want to have an image that I select through CSS to

  • 0

Okay so I want to have an image that I select through CSS to be fluid based, however, this is the problem that I run into.

This is what I think in my head I have to do, however, it doesn’t work:

#image { background-image:pic.jpg; height:100%; width:100%; }

But, you can’t have this tag use the “height:100%;”, correct? You have to set it to a pixel width. But if I want it to be fluid.. then I can’t set it to a pixel width, correct?

Is there another way to do this? Thanks.

  • 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-11T01:49:52+00:00Added an answer on June 11, 2026 at 1:49 am

    If you do it this way it will be fluid:

    HTML:

    <img src="http://news.bbcimg.co.uk/media/images/62777000/jpg/_62777247_62777242.jpg" alt="" />

    CSS:

    ​img {
    width: 100%;
    }​

    http://jsfiddle.net/7hMbQ/1/

    Or if you want to stretch width and height to 100% try this (but the ratio will not be correct):

    http://jsfiddle.net/7hMbQ/3/

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

Sidebar

Related Questions

Okay, so I want to have a generic method that can read data from
Okay, so I have a UITableView that I want to apply themes to. I
Okay all, I have a form that I want users to fill out. When
Okay so I want to make an application that launches other applications. However, the
Okay, so I have a JSON array of image URLs. I want to load
Okay, I have a method that takes the variables: an image, int x, int
Okay, I have two different background .jpgs that I want to used as the
Okay, So I have a PHP file that uploads a image to my server.
Okay, I have a question guys. I want to remote upload (copy an image
Okay, so I have a code, that take an image of the current view,

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.