Background Fit Browser

Background Fit Browser

Post by jadecook on Sat Apr 13, 2013 3:06 pm
([msg=75097]see Background Fit Browser[/msg])

Say I wanted to make my background image auto fit the browser. I have the current code written something like this.

Code: Select all
body {
background-image:url(/image.jpg);
background-size:cover;
background-repeat:no-repeat;
}


But it doesn't seem to do what I want it to do. I just want the background to cover the complete background, and stay fixed when I scroll either up or down. HELP!
User avatar
jadecook
Experienced User
Experienced User
 
Posts: 77
Joined: Fri Aug 17, 2012 2:20 pm
Blog: View Blog (0)


Re: Background Fit Browser

Post by LoGiCaL__ on Sat Apr 13, 2013 7:44 pm
([msg=75103]see Re: Background Fit Browser[/msg])

User avatar
LoGiCaL__
Addict
Addict
 
Posts: 1061
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)


Re: Background Fit Browser

Post by jadecook on Sat Apr 13, 2013 8:02 pm
([msg=75104]see Re: Background Fit Browser[/msg])

Nothing showed up when I pressed that link.

-- Sat Apr 13, 2013 8:06 pm --

Nevermind, I guess I just didn't give it time to load. But yeah! Perfect!

Code: Select all
body {
   background-image:url("/image.jpg");
   background-repeat:no-repeat;
   background-attachment:fixed;
   background-size:cover;
}
User avatar
jadecook
Experienced User
Experienced User
 
Posts: 77
Joined: Fri Aug 17, 2012 2:20 pm
Blog: View Blog (0)



Return to Web Design

Who is online

Users browsing this forum: No registered users and 0 guests