Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2011, 04:41 PM
Registered User
 
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default background-color vs background-image

My "style.css" reads as follows:
Quote:
@import url('../parentTheme/styles/backgrounds_CSS_only.css');

div#headerandmenuwrapper
{
background: none !important;
background-image: url('images/ACPR-Logo.png') !important);
background-repeat: no-repeat !important;
}

div#header
{
background: none !important;
}
On the other hand, the imported file ("backgrounds_CSS_only.css") reads as follows:
Quote:
div#headerandmenuwrapper
{
background: #0000FF;
}

div#header
{
background: #00FF00;
}
I just can't understand why, if I indicated "background: none !important;" for both "div#headerandmenuwrapper" and "div#header" selectors, the image "background-image: url('images/ACPR-Logo.png') !important);" doesn't show.

The site can be seen "here."

Any guidance is appreciated. Thanks!!!
 
Old February 20th, 2011, 09:39 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

When I try following the path to this image (http://wp-multisites.com/wp/accesori.../ACPR-Logo.png), it says that it doesn't exist. I would confirm that this is the correct path to your image folder and that the png is present.

I would also avoid using !important if at all possible. It overrides anything making it incredibly difficult to build your stylesheets. It also makes it impossible for users to use their own stylesheets; this typically happens with people who are legally blind or have other special needs and have someone configure a computer for them. However, !important can override those settings and make the page completely unreadable for them.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
change color of background meena88 C# 2005 3 December 1st, 2009 04:48 AM
Background Color matrix ArnieStewart BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 3 October 21st, 2008 01:12 AM
mdi-background color avats General .NET 1 February 28th, 2008 10:25 AM
background-color disappears harpua CSS Cascading Style Sheets 1 August 19th, 2005 04:53 PM
Get stylesheet's background color muklee Javascript How-To 2 October 31st, 2004 08:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.