Solved

CSS background image

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

Accepted Solution

by:
becraig earned 500 total points
Comment Utility
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
Comment Utility
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 28

Expert Comment

by:becraig
Comment Utility
I know terribly sorry about that  :)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
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…
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 …

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now