SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Location
    Dhaka, Bangladesh
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to fix Big image as background image in web design?

    Hi everybody, I am in a problem of big image-background in css! How can I solve big image as background-image for different wide of window? Please help me.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,288
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Code:
    	background:url(images/img.jpg) no-repeat fixed 50% 50%;
    	background-size:cover;	
    }
    ie9+

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    If you need wider support, you could try some jQuery, such as

    http://buildinternet.com/project/supersized/3/core.html
    http://srobbin.com/jquery-plugins/backstretch/

    Another example of the CSS3 method mentioned by Paul is here:
    http://www.alistapart.com/articles/s...ground-please/
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


Tags for this Thread

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
  •