Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    2
    Member #
    38605

    Help: Resizing background image size

    Hi folks,

    I'm having difficulty making the scale of pngs respond to the browser size. I've been trying to add "height: 100%;" and "width: 100%;" to all and any of the tags and still can't seem to get it to work. Any ideas what I should do?

    Here are screen grabs of my code.
    screen1.png
    screen2.png

    Appreciate the help!

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Try:
    Code:
    background-size:cover;
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Junior Member
    Join Date
    Mar 2014
    Posts
    2
    Member #
    38605
    Doesn't seem to be working
    Any ideas where specifically in my code I should be adding it to?

  5. #4
    Junior Member DarrenStreet's Avatar
    Join Date
    Mar 2014
    Location
    Oxford
    Posts
    6
    Member #
    38622
    Liked
    1 times

  6. #5
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    There's really no sense in bringing jQuery into this, or any javascript for that matter. Whatever element contains the background, you just add background-size:cover;
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:27 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com