How to make css background image responsive?

Discussion in 'HTML & Website Design' started by ivrsell, May 16, 2014.

  1. #1
    Hi, Can some one help me how to reduce css background image in order to fit in mobile version?
    Images are cutting off a little on the right side when I reduce the window to match mobile size.

    The last three images on this website: Audio, Music, Design

    http://www.neoloveproductions.com/about/

    I appreciate your help....
     
    ivrsell, May 16, 2014 IP
  2. xXxpert

    xXxpert Well-Known Member

    Messages:
    604
    Likes Received:
    34
    Best Answers:
    9
    Trophy Points:
    165
    Digital Goods:
    7
  3. WPhelpcat

    WPhelpcat Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Just add width:100% to the image css, or background-cover for backgrounds.

    Best,
    Tom
     
    WPhelpcat, May 16, 2014 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    My advice -- on mobile just get rid of them. There is no reason to be wasting space on a tiny little mobile screen on PRESENTATIONAL images that add nothing of value to the page/content. That or I'd make smaller versions the same height as the headings, and put them next to the headings when it's narrow.

    Side note -- might also help if you had accessibility BEFORE adding responsiveness -- your use of absurdly undersized fixed metric (aka px) fonts and hard to read ultra-thin webfonts (that probably look fine on a Mac, but suck everywhere else) REALLY isn't helping make for a good page. 14px on BODY? How to throw accessibility right out the window.

    Some logical heading orders wouldn't hurt either, but being the usual train wreck of "I cans haz intarnets" turdpress markup -- good luck with that given all the other nonsense in the way.
     
    deathshadow, May 17, 2014 IP
  5. Jigney

    Jigney Active Member

    Messages:
    168
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    93
    #5
    I just visited your site and your background is just not displayed well in mobile device,
    Just use this in your css.
    And it will be fixed...

    @media (max-width: 470px) {
    #audio_neo, #music_neo, #graphic_neo {
    background-size: 100% auto;
    width: 100%; }
    }
     
    Jigney, May 18, 2014 IP