Image behind text

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
User avatar
Dirk Engelage
Regular
Posts: 9
Joined: Mon Nov 19, 2018 9:34 pm
Location: Vorden, Netherlands
Contact:

Image behind text

Post by Dirk Engelage » Thu Dec 13, 2018 4:30 pm

Hi,

Maybe the matter has been discussed before, but I couldn't find it. What I would like to do is; use a background image or color for the whole surface behind the text. A kind of wallpaper so to speak. Is that possible? And how can I accomplish that?

greetings,
Dirk Engelage
People are far too interesting to be ignored!

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Image behind text

Post by Don Chambers » Thu Dec 13, 2018 5:31 pm

Behind what text? Can you provide a url to your site?

User avatar
Dirk Engelage
Regular
Posts: 9
Joined: Mon Nov 19, 2018 9:34 pm
Location: Vorden, Netherlands
Contact:

Re: Image behind text

Post by Dirk Engelage » Mon Dec 17, 2018 5:13 pm

What I meant is; can I use a fixed background like one can in WordPress.
People are far too interesting to be ignored!

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Image behind text

Post by Don Chambers » Mon Dec 17, 2018 5:29 pm

Probably. It is usually just a matter of css. We would need to know what serendipity theme you are using, which is one of the reasons I asked for a url to your site.

User avatar
Dirk Engelage
Regular
Posts: 9
Joined: Mon Nov 19, 2018 9:34 pm
Location: Vorden, Netherlands
Contact:

Re: Image behind text

Post by Dirk Engelage » Mon Dec 17, 2018 10:03 pm

Hi,
Thanks for your reply. The frontend I'm presently using on one site is xcur (2013-10-26). On another site I'm using 2k11.
The reason why I chose Serendipity, is the ease of use and the small learning curve. I tried WordPress, but there's just too much options there. The one thing that I'm missing in Serendipity is the option to use fixed backgrounds for my site.
Links to one, as of yet basic and experimental site (the one using 2k11 as frontend) is https://compast.nl.
People are far too interesting to be ignored!

User avatar
Don Chambers
Regular
Posts: 3633
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA
Contact:

Re: Image behind text

Post by Don Chambers » Mon Dec 17, 2018 11:04 pm

I believe you are asking to use an image as the background for the <body> element. If so, you will find some good information on w3schools.com. A serendipity theme that uses a body background image is "pixel". It's css file demonstrates how to do this:

Code: Select all

body {
  text-align: center;
  margin: 0;
  padding: 0 0 15px 0;
  font-family: trebuchet ms, arial, helvetica, sans-serif;
  background: #000 url({TEMPLATE_PATH}img/bgbody.jpg) top center no-repeat;
  color: #eee;
  }
The background is set to the background color hex value of #000 (black) and also uses an image named bgbody.jpg located in the theme's '/img/ subfolder.

You can easily modify xcur or 2k11 to use a body background image.

2k11 is a core theme, so any changes you make to it will be lost the next time you update Serendipity. A better choice would be to make a copy of the 2k11 (or xcur) theme, modify the copy, then use that copy. The steps to do that would be:
  • Create a new theme folder, such as 2k11-copy.
  • Copy all 2k11 files into this new folder.
  • In the copy folder, use a text editor to edit the file info.txt
  • Change the first line in info.txt from "Name: 2k11" to "Name: 2k11-copy"
  • Select the copy as your site's theme.
You can then work on the copy as you wish without concern for losing your modifications by any future Serendipity updates.

User avatar
Dirk Engelage
Regular
Posts: 9
Joined: Mon Nov 19, 2018 9:34 pm
Location: Vorden, Netherlands
Contact:

Re: Image behind text

Post by Dirk Engelage » Tue Dec 18, 2018 8:57 am

Thanks! That's a lot of clear instructions. I'll go and experiment a bit and see how I can get things to look as I want.
friendly greetings, Dirk
People are far too interesting to be ignored!

jmglastetter
Regular
Posts: 11
Joined: Fri Dec 14, 2018 7:27 am

Re: Image behind text

Post by jmglastetter » Wed Dec 19, 2018 6:37 pm

Hi Don!

I wanted to let you know that for all the years I have been using 2k11, I've always had to keep notes of what I changed, so when I updated I would know what I needed to change back that was lost.

Your instructions here are so clear, that I absolutely jumped on board following your instructions...worked perfectly! Now I am actually looking forward to the next update as I won't have a punch list to complete unlike updates past!

Your instructions need to be made at least a sticky, and given thought as to being made part of the training docs in s9y!

Congrats! Thank you so much!

Post Reply