Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-04 03:26:12

jhwilliams
Member
Registered: 2007-01-04
Posts: 13

Background image for article

How do I give the content only (that is, not to the entire page) of an article a background image?

Thanks,

JHW

Offline

#2 2007-01-04 06:57:34

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Background image for article

Look in either your page template or article form for the article’s containing element. Most likely it’s <div id="content"> from the default install (found in both the default and archive/article templates). In your CSS (Content>Style), add:

#content {
background: url(my_image.png) no-repeat center; /*or other layout*/
}

Offline

#3 2007-01-04 12:47:53

jhwilliams
Member
Registered: 2007-01-04
Posts: 13

Re: Background image for article

Thanks for the response.

I’m so new at this.

If my background image is in the image directory, do I use its name or the ID#? That is, should it be background.jpg or image/4.jpg ?

THank you,

JHW

Offline

#4 2007-01-04 19:02:09

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Background image for article

If you uploaded it through the Textpattern interface, use the ID with the extension (you can always right click an image>properties in TXP interface). You’ll also want to include the path in the CSS, so if it’s a default install, use:

background: url(/images/4.jpg) no-repeat center; (if TXP is not installed in the root, use /path/to/images/4.jpg.

Offline

Board footer

Powered by FluxBB