|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

May 16th, 2005, 08:04 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
background image for <div>
background-image: url('/images/menu_header_bk.jpg'); works for IE but not for Firefox.
|

May 16th, 2005, 08:35 AM
|
 |
Wrox Author
Points: 71,804, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,050
Thanks: 80
Thanked 1,581 Times in 1,558 Posts
|
|
It works for me, both in IE as in FireFox.
How are you using this property?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

May 16th, 2005, 08:52 AM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It not works unless I add height attribute.
|

May 16th, 2005, 09:06 AM
|
 |
Wrox Author
Points: 71,804, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,050
Thanks: 80
Thanked 1,581 Times in 1,558 Posts
|
|
Well, it works for me in a simple test scenario, so it must be the way you're using the property that is causing this behavior.
How are you using the property?
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

May 16th, 2005, 12:00 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
You'd have to use the height property if the element is empty. height works in the shrink-to-fit fashion (assuming standards mode is the rendering mode you're invoking), if there is no content then the height is zero. If the height is zero, and there is no padding, you won't see a background, unless you place the background image on one of the two magic elements <html> or <body>, which are special exceptions where height is irrelevant.
As Imar points out, it helps to see in what context you are applying the property (in the form of some links to the project!), otherwise it's a moot discussion as we can only speculate what you're doing to cause it to fail.
Regards,
Rich
--
[ http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |