Adding background image in a post
I want to add background images in my posts like this post http://csswiz.wordpress.com/2009/08/11/backgrounds-in-posts/
I used div tag in my post but it didn’t worked. Do I have to edit my theme file? Then please tell me how to do it.
And i am also facing another problem. When i write a post the titles of my previous posts are also showing up. Here is the link to my site http://www.rudragems.com
Its not showing on front page but when u click on a post it is showing previous titles as well. Any help is appreciated.
You need to assign a background image to that div tag. Simply using a div tag without assigning a background image (or colour) to it will cause the div tag to not have any background.
Also, the titles of the previous and next posts are there by design. They provide navigation for your users. If you don’t want them to be displayed, just hide them using CSS.
I have assigned image.. My post code is this
<html><body background=”http://h1.ripway.com/vaibhavbthl/Images/Ancient%20Scroll.jpg”>My article</body></html>
Using div tag was complicated for me. Do I need to change theme’s code to let it work with my post code. If so pls tell me how to do that.Admin
You cannot add another
<body>element inside the post, since the template already have those two elements.
The correct way is to use the
<div>element and assign the background to that element.
<div style="background:url(http://h1.ripway.com/vaibhavbthl/Images/Ancient%20Scroll.jpg)">My article</div>
You must be logged in to reply to this topic.