SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stretch a background image - responsive design

    Hi guys,

    in general this seems to be the accepted methodology of creating a BG image and stretching it.

    http://starikovs.com/2013/01/26/stretch-bg-img-css/

    I have tried this, and although it works if I refresh the screen, which is great, because hopefully people aren't resizing browsers all over the place, when I reduce my screen size, it appears that the height of the image doesn't change. In fact the width only changes for a short while and then stops.

    This means if you open the browser full screen, then reduce the browser there is a big white square at the bottom. I built the initial with foundation zurb if that helps anyone to help me.

    Can anyone think of why this may be happening?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,614
    Mentioned
    413 Post(s)
    Tagged
    7 Thread(s)
    Can you show us your version? I usually don't see the behavior you are describing.

  3. #3
    Non-Member
    Join Date
    Apr 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello,
    i think just remove height and width from img src tag

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Image size is "cover" so it doesn't have set dimensions. I'll upload a working version soon enough.

    Cheers,
    Eoin


Bookmarks

Posting Permissions

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