Solved

background image on website not taking up full page

Posted on 2013-05-27
4
383 Views
Last Modified: 2013-06-12
Hi guys,

On the following site, http://piratescove.yourcitybeats.com i am having an issue where on some resolutions the bg image is not taking up the whole page?

any ideas why?
0
Comment
Question by:jonathanduane2010
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:Andrej Pirman
Andrej Pirman earned 294 total points
ID: 39199862
Try with this image property in CSS of background:
background-size: 100%;

Open in new window

If your image would be broken in aspect ratio, try some of these two properties:
 "background-size: cover;" or "background-size: contain;"
For example:
body.custom-background {
  background-attachment: fixed;
  background-color: #E6E6E6;
  background-image: url("http://piratescove.yourcitybeats.com/wp-content/uploads/2013/05/Background.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100%;
  background-size: cover;
}

Open in new window

0
 

Author Comment

by:jonathanduane2010
ID: 39199883
which css file?
0
 
LVL 18

Accepted Solution

by:
Andrej Pirman earned 294 total points
ID: 39199954
Sorry, it is not separate CSS file in your case, but <style> code in your main file. IT looks like this, around line 40:

<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #e6e6e6; background-image: url('http://piratescove.yourcitybeats.com/wp-content/uploads/2013/05/Background.png'); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; }
</style>

Open in new window

Change it to:
<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #e6e6e6; background-image: url('http://piratescove.yourcitybeats.com/wp-content/uploads/2013/05/Background.png'); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; background-size: 100%; background-size: cover;}
</style>

Open in new window

(you see, I added background-size: 100%; background-size: cover; at the end)
0
 
LVL 10

Assisted Solution

by:Ishaan Rawat
Ishaan Rawat earned 146 total points
ID: 39200340
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question