Results 1 to 3 of 3

Thread: MAX width and max height of a image using css

  1. #1
    Join Date
    Apr 2009

    MAX width and max height of a image using css

    I am made a file web page where i am using css code for uplaoding any images.I am having a doubt regarding one thing, is there any way which we can for an image where we can set some condition where image cannot go beyond that height and width.I have heard that we can do it by using max height and max width but don't know how to use this.

  2. #2
    Join Date
    Mar 2009

    Re: css max image width proportions

    For making some restriction on image height and width in Opera, Internet Explorer and other browser you can use the following code in css.

    #frontpage img {
    max-width: 200px;
    max-height: 200px;
    #gallery img {
    max-width: 500px;
    max-height: 500px;

  3. #3
    Join Date
    Feb 2008

    Re: How to MAX width and height of a image using css

    Try to put it inside a div with a set width and height and set overflow: none do the following this in CSS file, now dimensions of image are proportional & constrain and they set by default.

Similar Threads

  1. How to know height of row in Excel?
    By Dipanwita in forum Windows Software
    Replies: 2
    Last Post: 04-01-2012, 07:19 PM
  2. Replies: 5
    Last Post: 26-12-2011, 11:22 AM
  3. Problems with Viewport.Height & Width
    By KABIRA16 in forum Software Development
    Replies: 4
    Last Post: 10-11-2009, 06:24 PM
  4. Fixed height & width in new window
    By Gustak in forum Customize Desktop
    Replies: 2
    Last Post: 08-12-2008, 06:05 PM
  5. Variable height in CSS
    By Sentential in forum Software Development
    Replies: 8
    Last Post: 22-10-2008, 02:51 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Page generated in 1,642,620,394.52049 seconds with 17 queries