By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

CSS not showing background-image

P: n/a
I'm having a problem with my background image in DIVs.
here is my code:

CSS:
#HeaderDiv
{

}

#HeaderDivTopLeft
{
background: #020167 url(images/banner_top_left.jpg) no-repeat fixed
left top;
width: 73px;
height: 79px;
}

#HeaderDivTopRight
{
background: #020167 url(images/banner_top_left.jpg) no-repeat fixed
left top;
height: 79px;
width: 73px;
}

HTML
<html>
<head><link rel="stylesheet" type="text/css" href="master.css" /></
head>
<body>
<div id='HeaderDiv'>
<div id='HeaderDivTopLeft' </div>
<div id='HeaderDivTopRight'</div>
</div>
</body>
</html>

my problem is the background-image for the HeaderDivTopRight won't
display, and cause it is a copy and paste of the line frm
HeaderDivTopLeft, I'm really confused.

Thanks in advance

Mar 6 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
fletch wrote:
I'm having a problem with my background image in DIVs.
here is my code:
Post a URL, not code.

--
Berg
Mar 6 '07 #2

P: n/a
Scripsit fletch:
I'm having a problem with my background image in DIVs.
here is my code:
The usual answer to people who post a question about a specific page without
including its address (URL) is something like this: Sorry, we've run out of
crystal balls. Post the URL if you want some help.

This time the problem is simple enough and I'm excessively
overphilanthropic, so I took the trouble of constructing a test case and
noticed:
background: #020167 url(images/banner_top_left.jpg) no-repeat fixed
It's the "fixed" keyword. It makes the background image fixed with respect
to the viewport (basically, browser window). So it probably happens to
appear inside the element in the first <divbut not later on the page. Just
removing "fixed" should fix this. Probably. Hard to tell without a URL
(hint, hint) how you really want the background image to appear.

P.S. It's useful to post the URL when asking about a problem with a web
page.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Did you know that web pages can be referred to with URLs?

Mar 6 '07 #3

P: n/a
In article <zZ******************@reader1.news.saunalahti.fi >,
"Jukka K. Korpela" <jk******@cs.tut.fiwrote:
This time the problem is simple enough and I'm excessively
overphilanthropic
You can no more be this than a tall building can be taller than
it is.

--
dorayme
Mar 6 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.