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

Asked by:
caspianblacksea / 25 Points
Time:
2012-11-26 9:49 pm EST
Category:
Website Design
Hits:
651
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

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

jamesr
Staff
2,132 Points
2012-11-26 10:35 pm EST
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('/help/folder/image.jpg') left no-repeat;"

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

Take Care!

James R

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help 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.
}