Solved

background image on website not taking up full page

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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 reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

11 Experts available now in Live!

Get 1:1 Help Now