Jump to content

Recommended Posts

Posted

I am having a problem attaching a background image to a theme's 'body' in Wordpress. Basically, the change looks fine on my screen but when I do a preview it doesn't show the change. I am saving the change before previewing. When I use a color for the background it shows up fine in preview mode.

 

Here is the code

 

body {

background-color: #f1f1f1;

}

body,

input,

textarea {

color: #666;

font-size: 12px;

line-height: 18px;

background-image: url(images/mybckgnd.jpg);

}

This is running on a local wampserver and below is what it looks like,

 

post-38912-030083400 1335947873_thumb.png

 

Thanks for any suggestions.

Posted

Not sure what you mean 'my screen' vs. 'preview' - but bottom line, go by what you see in a browser. (I'm assuming you mena the Wordpress Preview, so you should be looking at your page in a browser.

 

You're also not saying what 'the change' is, so I am not sure what you're trying for and what you're actually getting.

 

Check the CSS for your background image. In CSs, if you line things up with commas, it applies whatever you define to all of it. In your case, to body (good), something called 'input' - it doesn't have a class or an ID symbol, and I'm not sure if that's one of the new HTML5 tags, but generally, 'input' by itself to me is and unknown. Similar with 'textarea' - is that an HTML 5 tag? (I promise, one of those days, I'll finish Stef's HTML5 tutorials).

 

So if you could be more specific about what you are trying to achieve, what you are getting instead, and it always helps to see ALL the code.

Posted

Thanks, I will try and explain things a little better.

 

1. The attached image shows what the change to the 'body' background looks like when I attach the new background image.

 

2. I then save my work and view it with a browser (FFX, IE and Google) but the background image does not show in the browser preview, it is only the background color that shows.

 

3. I am using the edit tool in Dreamweaver to make this changes so I am not hand coding.

 

4. Purpose - I am playing around with making changes to a WP theme via the CSS style sheet.

 

5. The style sheet is too long but I can post that later.

 

Thanks again.

Posted

5. The style sheet is too long but I can post that later.

 

 

... and it always helps to see ALL the code.

 

By 'ALL', I mean HTML and CSS - and long or not long, without seeing what you got, all I can go by it what my crystal ball shows me, and that thing uses FrontPage.

Posted

Thanks again. I couldn't attach the style sheet because 'I was away from my workstation' when I responded.I will start the WordPress tutorial afresh since the problem is not limited to the background image alone, just to make sure I am doing the right thing. Maybe letting you know the theme I am working with might be more helpful, the style sheet is easy to get to but then the HTML is sandwiched in PHP etc.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...