forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: DefenceTalk.com on January 02, 2005, 03:35:00 am

Title: What does it take to add a background image to a table?
Post by: DefenceTalk.com on January 02, 2005, 03:35:00 am
I have been trying for past 1 hour and it doesn't work. However same code works on non CPG page? I am bit confused here:

.tableh1 {
       border: 1px solid #BEBEBE;
       background-image: url(i/top3bg.jpg);
   color : #FFFFFF;
   padding-top: 4px;
   padding-right: 3px;
   padding-bottom: 4px;
   padding-left: 3px;

And

.tableh3 {
    border: 1px solid #BEBEBE;
   background : url(i/bg.jpg);
   color : #FFF788;
   padding-top: 2px;
   padding-right: 3px;
   padding-bottom: 2px;
   padding-left: 3px;

What am I doing wrong?

Link to the gallery:

http://www.defencetalk.com/pictures
Title: Re: What does it take to add a background image to a table?
Post by: donnoman on January 02, 2005, 03:47:43 am
i always use the : background-image:url(i/whatever.gif) syntax.

One thing that you have to remember is that the location you give is relative to the CSS file, not the html file that references it.

so if you had /index.php link to  themes/mytheme/style.css then the example above would be looking for file: themes/mytheme/i/whatever.gif not /i/whatever.gif