What's the CSS code to place an uploaded gif image as a sidebar background?

Asked by:
caspianblacksea
Time:
2012-11-26 5:49 pm
Category:
Website Design
Hits:
228
I've uploaded a gif image onto my media library. It's

http://www.englishecho.com/wp-content/uploads/2012/11/leftbar-2.gif

But I'm having trouble placing it as a background image on my left sidebar.

What would be the CSS command in the CSS style sheet?

Or do I upload the image elsewhere? If this is the case, how and where do I do this?

Thanks.
Ben

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

jamesr
2012-11-26 6:35 pm
Thank you for your question caspianblacksea!

Adding CSS code can be a bit tricky as it requires you to be able to edit the code of the site. Make sure you have backups of your site before editing the code on the server. For information on backups click here. If you are not comfortable editing the code of your site you will want a developer to help as we do not offer coding support.

Depending on where the code lies for the side bar you can do the following.

1. Create a class for the side bar html tag like the following:

class="back-image"

Example: (If the sidebar is in DIV tags)

<div class="back-image">
The sidebar content
</div>

2. Add the CSS to the stylesheet.

.back-image {
background: url(folder/image.jpg) left no-repeat;
}

Change "folder/image.jpg" to the location of your image on the server.

Now the image will display as a background image in the div section the class was added to.

You can also add an inline style to the sidebar tag like the following:

style="background: url('/support/folder/image.jpg') left no-repeat;"

For more information on CSS please see Adding CSS to your Website

Take Care!

James R

You must login before you can post a comment about this answer.

Like this Question?

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.