Solved

Over-riding style sheet settings

Posted on 2006-11-22
4
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 i…
Find out what you should include to make the best professional email signature for your organization.
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

729 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