#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Javascript resize certain images depending on browser resolution


    Hey there

    I know this is probably not the usual place to go to find talented people to build javascripts for me, but I don't know where else to look.

    I'm currently building a site for use on desktop, tablet, and mobile devices. Everything is going great, apart from a little trouble with my logo image. I would like to know if anyone who has or can quickly whip up a script to detect browser resolution and then resize the logo images accordingly (and possibly the divs they are held in too) without affecting any other images.

    I am fairly confident with editing pre-made javascript but my brain turns to mush whenever I get to coding from scratch with it so if anyone would be kind enough to help me out, your efforts would be much appreciated! c:

    - Matt
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,158
    Rep Power
    183
    Look into CSS3 Media Queries and use some type of utility/plugin; like Modernizr, to make it "some what" cross browser compatible. This is the best approach, for what you are trying to do.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Originally Posted by web_loone08
    Look into CSS3 Media Queries and use some type of utility/plugin; like Modernizr, to make it "some what" cross browser compatible. This is the best approach, for what you are trying to do.
    Aha! Thank you very much Web_Loone08, I completely forgot about the added media queries in css3. Max-width is perfect for what I was trying to achieve.

    Cheers!

    - Matt

IMN logo majestic logo threadwatch logo seochat tools logo