Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 6th, 2007, 08:05 PM
fletch
Guest
 
Posts: n/a
Default CSS not showing background-image

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

  #2  
Old March 6th, 2007, 09:15 PM
Bergamot
Guest
 
Posts: n/a
Default Re: CSS not showing background-image

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

--
Berg
  #3  
Old March 6th, 2007, 09:35 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: CSS not showing background-image

Scripsit fletch:
Quote:
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:
Quote:
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?

  #4  
Old March 6th, 2007, 11:45 PM
dorayme
Guest
 
Posts: n/a
Default Re: CSS not showing background-image

In article <zZkHh.10270$lD3.3807@reader1.news.saunalahti.fi >,
"Jukka K. Korpela" <jkorpela@cs.tut.fiwrote:
Quote:
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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles