...

View Full Version : image resize depending on width AND height



gordongoes
09-13-2011, 08:56 AM
so right now, the images on my website resize when the width of the browser is changed and the image will always try to maximize its size
(width=100%)

how can i get the images on my site to resize according to height too, so that if the height is the minimum paramter (like a landscape oriented screen), then the image should resize to the max height not the max width

rather than post code here, you can see my website at http://gogogordon.com to see what i mean
my website is NSFW btw


and right now for my menu bar at the top of the page, i have to change the menu bar on each html page that i have
how can i set my site up so i just have to change the menu once and it affects all pages, any ideas? table? div?

im using java and my css file is named styles.css

i'm still a newb at coding so sorry if these are stupid questions

ronaldroe
09-13-2011, 01:32 PM
You can use the orientation function of media queries to detect if the user is in portrait or landscape, and set the value according to that.

http://www.w3.org/TR/css3-mediaqueries/#orientation



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum