Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 22-05-2009
Members
 
Join Date: Apr 2009
Posts: 47
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.
Reply With Quote
  #2  
Old 22-05-2009
Member
 
Join Date: Mar 2009
Posts: 89
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.

Code:
#frontpage img {
max-width: 200px;
max-height: 200px;
}

#gallery img {
max-width: 500px;
max-height: 500px;
}
Reply With Quote
  #3  
Old 22-05-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "MAX width and max height of a image using css"
Thread Thread Starter Forum Replies Last Post
How to know height of row in Excel? Dipanwita Windows Software 2 04-01-2012 07:19 PM
Why Apple QuickTime is swapping height and Width of Video playing? Bhuvnesh 1 Windows Software 5 26-12-2011 11:22 AM
Problems with Viewport.Height & Width KABIRA16 Software Development 4 10-11-2009 06:24 PM
Fixed height & width in new window Gustak Customize Desktop 2 08-12-2008 06:05 PM
Variable height in CSS Sentential Software Development 8 22-10-2008 02:51 PM


All times are GMT +5.5. The time now is 02:45 AM.