Solved

background image on website not taking up full page

Posted on 2013-05-27
4
381 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 9

Assisted Solution

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
This video teaches users how to migrate an existing Wordpress website to a new domain.

939 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now