Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Resizing images with HTML?

I'm working on an internal website at work, and at the top of the page I have the company's logo. There are dozens of computers where I work, and some monitors are larger than others.

Is there a way (using HTML, XHTML, CSS, etc.) that I can get my image to automatically resize itself to the width of any monitor it is being displayed on? Like an "img: fit" tag or something? Please help. This has been eating me alive for a week.

PS. I'm coding this oldschool style- in MS Notepad. The default browser is Firefox.

2 Answers

Relevance
  • Anonymous
    1 decade ago

    you can use css.

    Give the image an ID

    <img src="image.jpg" id="image">

    and give it a variable size

    #image {

    width = 50%;

    height = 50%;

    }

    For really high res screens you might want to set a max width and height too

  • 1 decade ago

    You can try resize using percentage in its width and height, didn't test yet.

Still have questions? Get your answers by asking now.