Adding Textured Background

Have a fabic looking background I want to use on one page of website. It’s a jpeg. How do I do this?

This will usually do the trick:

html, body {
 background: url("/graphics/background-fabric.jpg");

This is what I added, but nothing changed.

html, body {
background: images/Pattern.jpg;

The file URI should be specified with url() syntax, or at least as a string!

body {
 background:  url("images/Pattern.jpg");
Off Topic:

Why is this CSS question in the HTML/XHTML forum?

Guess I don’t know what you mean by URL.

I posted this question under HTML because I wasn’t sure how to do this period. If I knew I would have posted accordingly. Sorry.

Finally figured it out…many thanks.

A URL (or URI) is basically a link, in this case images/Pattern.jpg. The URI should always be in quotes, as show in Tommy’s examble (which you should be able to copy-paste directly into your CSS file).

Also, don’t worry too much about the section. Generally, design questions should be placed in the CSS section, but it might take a little while to get used to what is CSS and what is HTML.

Off Topic:

Tommy: I can show the HTML answer, if it’ll make you feel better? :stuck_out_tongue:

That attitude, which, unfortunately, seems prevalent among moderators, too, is one of the major causes for the recent plummeting quality of SitePoint Forums. The search function is rendered almost useless if people post wherever they like, instead of where the question belongs.

If mods don’t want the extra burden of moving posts from inappropriate locations, then SitePoint should remove all subforums and just have one big free-for-all (since that’s essentially what we’re heading towards, anyway).

@Barnum, it’s quite simple, really:

[list][]HTML is about what things mean (semantics) and how they are structured
]CSS is about how things look (presentation)
[*]JavaScript is about how things behave (interaction)[/list]
If you are unsure whether something should go in the (X)HTML or CSS forum, you can post it in the parent forum, Web Page Design.

I agree entirely… I spend half my time reporting threads posted in the wrong sections of the forum. :frowning:

Public comments like that don’t help either, they’ll just reinforce what is already becoming a self fulfilling prophesy, come on people, put a positive spin on it! Sitepoint has a large number of highly knowledgable and experienced posters and staff members, it’s a hugely useful resource and one of the most visited sites on the internet.

You’d be crazy not to want to be a member of this amazing community!