2 Replies - 204 Views - Last Post: 08 June 2018 - 02:22 PM

#1 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 108
  • Joined: 16-January 13

Make image auto shrink or expand based on monitor size

Posted 08 June 2018 - 09:01 AM

In one asp.net page, I need to add a jpg image file.

Since company computer monitors are different size, 17" or 23", how to code to make image auto shrink or expand based on monitor size?
Is This A Good Question/Topic? 0
  • +

Replies To: Make image auto shrink or expand based on monitor size

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14854
  • View blog
  • Posts: 59,272
  • Joined: 12-June 08

Re: Make image auto shrink or expand based on monitor size

Posted 08 June 2018 - 09:03 AM

Perhaps use the 'percent' option for width or height. Make sure to realize that is relative to the parent container.
Was This Post Helpful? 0
  • +
  • -

#3 Martyr2   User is online

  • Programming Theoretician
  • member icon

Reputation: 5359
  • View blog
  • Posts: 14,256
  • Joined: 18-April 07

Re: Make image auto shrink or expand based on monitor size

Posted 08 June 2018 - 02:21 PM

This really isn't a ASP.net or webforms issue, this is just a CSS style issue. Check out the link below for a work up on how to make responsive images. The topic is half way down under "How do you create responsive images?"

https://developer.mo...sponsive_images

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1