Resizing images with HTML?

d4m4s74

New member
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
 
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
 
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.
 
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
 
Back
Top