Solved

Over-riding style sheet settings

Posted on 2006-11-22
4
165 Views
Last Modified: 2010-04-09
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
Comment
Question by:MkeNixon
4 Comments
 
LVL 21

Expert Comment

by:shuboarder
ID: 17997358
Perhaps you can override one CSS with another?
http://www.flexwiki.com/default.aspx/FlexWiki/StylesheetOverride.html
0
 
LVL 30

Expert Comment

by:Steggs
ID: 17997372
You can override the stylesheet with code in the <head></head> or inline style

Regards
0
 
LVL 12

Accepted Solution

by:
jessegivy earned 125 total points
ID: 17997509
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
 
LVL 11

Expert Comment

by:ethoths
ID: 18007708
A cleaner way would be in your style sheet...

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

Where id is the id of your div.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now