?
Solved

background image on website not taking up full page

Posted on 2013-05-27
4
Medium Priority
?
389 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
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…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

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