Login | Register | FAQ
Anonymous

Background image 100% in web page

+ Post a reply

5 posts Page 1 of 1


Background image 100% in web page

by riyaz123 » Wed Aug 13, 2014 12:39 pm

How to fix Background image 100% in web page?
User avatar

riyaz123

  • Posts: 15
  • Joined: Sat Jul 05, 2014 7:57 am

Re: Background image 100% in web page

by nanoverso » Thu Aug 14, 2014 1:04 am

Use CSS to define the body background size to 100%:
body {
background-size: 100% 100%;
}
User avatar

nanoverso

  • Posts: 247
  • Joined: Sat May 10, 2014 12:08 am
  • Location: Brazil
--
Mario blog (Portuguese): http://jogos-do-mario.nanoverso.com

Re: Background image 100% in web page

by Farhin Qureshi » Thu Jan 19, 2017 12:19 pm

Hi,

I think you have need to try this code.

Code: Select all
body {
    background-image:url("../images/myImage.jpg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
html {
    height: 100%
}


Thanks.
User avatar

Farhin Qureshi

  • Posts: 43
  • Joined: Tue Jan 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

Re: Background image 100% in web page

by eh3an2010 » Tue Jan 24, 2017 6:48 am

background-size: cover;
User avatar

eh3an2010

  • Posts: 1
  • Joined: Tue Jan 24, 2017 6:45 am

Re: Background image 100% in web page

by jackmarco » Fri Feb 24, 2017 8:57 am

You need to set the height of html to 100%

body {
background-image:url("../images/myImage.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
}
html {
height: 100%
}
http://jsfiddle.net/8XUjP/
User avatar

jackmarco

  • Posts: 2
  • Joined: Fri Feb 10, 2017 7:48 am


+ Post a reply

Page 1 of 1