Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

Over-riding style sheet settings

I have a page linked to a style sheet but I wish, in one area defined by a div id, to change the background image. Can I do this and if so what is the code?
0
MkeNixon
Asked:
MkeNixon
1 Solution
 
shuboarderCommented:
Perhaps you can override one CSS with another?
http://www.flexwiki.com/default.aspx/FlexWiki/StylesheetOverride.html
0
 
Mark StegglesWeb DeveloperCommented:
You can override the stylesheet with code in the <head></head> or inline style

Regards
0
 
jessegivyDeveloperCommented:
Nice link shuboarder provided :)  ...explains objective quite well!  I believe that inline styles are frowned upon slightly because it's not as clean as including in your main CSS and you'd have to edit the tag if you wanted to change it, but for single tag modifications can be a quite useful shortcut.

If you are interested in inline styles it's done like this:

<div style="background-image:url('images/otherBackgroundName.jpg');"></div>

Cheers,

Jesse
0
 
ethothsCommented:
A cleaner way would be in your style sheet...

#id
{
   background-image:url('BackGroundName.jpg');
}

Where id is the id of your div.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now