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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change a bg-image in a div or tablecell?

Status
Not open for further replies.

Ervier

Programmer
Feb 18, 2003
2
0
0
NL
I want to change the background image (preferrably using css) of a cell or div, but don't know how to change the div-property. See code below:

Code:
<div style=&quot;position: absolute; background: url(../img/book.jpg) no-repeat; width: 300px; height: 300px;&quot;>
 
this works for me - what problem are you having?
=========================================================
if (!succeed) try();
-jeff
 
Try this:

<style>
.a_cont{
position:absolute;
background:url('../img/book.jpg');
bakcground-repeat:no-repeat;
width:300px;
height:300px;

}
.a_cont:hover{
background:url('../img/book1.jpg');
}
</style>

<a href=&quot;link&quot; class=&quot;a_cont&quot;>textasdf as</a><br>
<a href=&quot;link&quot; class=&quot;a_cont&quot;>textsdf as</a><br>
<a href=&quot;link&quot; class=&quot;a_cont&quot;>textsdf asdfgasdf</a><br>
<a href=&quot;link&quot; class=&quot;a_cont&quot;>text sadf</a><br>
<a href=&quot;link&quot; class=&quot;a_cont&quot;>textasdf</a><br>

Rick -----------------------------------------------------------
RISTMO Designs
Arab Church
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top