Solved

CSS background image

Posted on 2013-01-08
3
317 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
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

791 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