[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

background image on website not taking up full page

Posted on 2013-05-27
4
Medium Priority
?
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:Andrej Pirman
Andrej Pirman earned 1176 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 1176 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 584 total points
ID: 39200340
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to create an extensible mechanism for linked drop downs.
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 purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

650 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