Solved

CSS background image

Posted on 2013-01-08
3
318 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Wordpress themes CSS? 6 30
ASP.net Markup for Sub Menu 2 39
Clear input text 15 26
Html using "Or" in condition 3 24
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.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

680 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