Page 1 of 1

Image behind text

Posted: Thu Dec 13, 2018 3:30 pm
by Dirk Engelage

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?

Dirk Engelage

Re: Image behind text

Posted: Thu Dec 13, 2018 4:31 pm
by Don Chambers
Behind what text? Can you provide a url to your site?

Re: Image behind text

Posted: Mon Dec 17, 2018 4:13 pm
by Dirk Engelage
What I meant is; can I use a fixed background like one can in WordPress.

Re: Image behind text

Posted: Mon Dec 17, 2018 4:29 pm
by Don Chambers
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.

Re: Image behind text

Posted: Mon Dec 17, 2018 9:03 pm
by Dirk Engelage
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

Re: Image behind text

Posted: Mon Dec 17, 2018 10:04 pm
by Don Chambers
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 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.

Re: Image behind text

Posted: Tue Dec 18, 2018 7:57 am
by Dirk Engelage
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

Re: Image behind text

Posted: Wed Dec 19, 2018 5:37 pm
by jmglastetter
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!

Re: Image behind text

Posted: Wed Apr 07, 2021 11:30 am
by Richardse
Thanks for the instructions Don. Useful and simple to understand. I was never that great with pictures to be sincerely honest. I struggled to edit even the simplest picture back in school when we were doing some classes about it. Fortunately enough we have apps that make it look much simpler now and I don't have to go through what I had in the classroom again. In fact, they have even discovered ways to turn pictures from black and white to color with great success admittedly. The other play I was goofing around with some old pictures that I found in a case.