Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 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; 09-13-2011 at 09:01 AM.

  • #2
    New to the CF scene
    Join Date
    Sep 2011
    Location
    OKC, OK
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •