Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Reply to Thread

Post a reply to the thread: Resizing images with HTML?

Your Message

Click here to log in

In what corner do we have Search box?

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 10-01-2009, 06:17 PM
    Midnightangel_00

    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.
  • 10-01-2009, 06:17 PM
    d4m4s74
    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
  • 10-01-2009, 06:17 PM
    raym0nd
    You can try resize using percentage in its width and height, didn't test yet.
  • 10-01-2009, 06:16 PM
    raym0nd
    You can try resize using percentage in its width and height, didn't test yet.
  • 10-01-2009, 06:16 PM
    raym0nd
    You can try resize using percentage in its width and height, didn't test yet.
  • 10-01-2009, 06:16 PM
    d4m4s74
    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
  • 10-01-2009, 06:15 PM
    d4m4s74
    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

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •