Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS background image

Posted on 2013-01-08
3
Medium Priority
?
322 Views
Last Modified: 2013-01-08
Please look at http://rkassoc.net/DrainageHouston/

Notice how the background image (drawing) covers the entire page, not just the body.

I want it to be a background image for the body only. See attached html / CSS. How can I make it for the body ONLY?

Thanks
index.htm
0
Comment
Question by:Richard Korts
[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
3 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 2000 total points
ID: 38757140
Fiddle around with this:
body
{
background-image:url('img.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
}




I think you want it to stay center / fixed and not be repeated .
0
 

Author Comment

by:Richard Korts
ID: 38757210
To becraig

Well, sort of. I DID want it to repeat, but just under the body. If I do no-repeat, I get it once, centered.

So I redid the background so it was an EXACT fit (width wise) for the background area.

CSS is awfully non-intuitive for some things.
0
 
LVL 29

Expert Comment

by:becraig
ID: 38757214
I know terribly sorry about that  :)
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

722 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