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
Solved

Over-riding style sheet settings

Posted on 2006-11-22
4
170 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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 is …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

828 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