Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css background-image problem

Status
Not open for further replies.

Bastien

Programmer
Joined
May 29, 2000
Messages
1,683
Location
CA
Hi All

I have the following code

Code:
<style type="text/ccs">
.tdimage{background-image:"url(/pix/bacground2.gif)"; background-repeat:"no-repeat";}
</style>
</head>

<body bgcolor="#999999" onload="startclock();">
<table width="1024" height="768" align="center">
  <tr>
    <td class="tdimage">
...

but my image does not display. If I place the image call inline in the td, i get the image but it repeats at the bottom of the page, which I don't want.

Any ideas?

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
try it like this:
Code:
.tdimage{background-image:url("./pix/bacground2.png"); 

background-repeat:"no-repeat";}

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Actually, you can put quotes around the url in the url call, but it is not needed nor recommended. You should definitely not put quotes around values in CSS though. So, I would suggest you switch to:
Code:
.tdimage { 
  background-image: url(/pix/bacground2.gif);
  background-repeat: no-repeat;
}
Of course, to tell you the truth, I would not use table for whatever you're using it anyway. You should be much better off with a div.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top