Web Analytics Made Easy -
StatCounter image resize depending on width AND height - CodingForum

Announcement

Collapse
No announcement yet.

image resize depending on width AND height

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • image resize depending on width AND height

    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
    Last edited by gordongoes; Sep 13, 2011, 04:01 AM.

  • #2
    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.

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎