Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Use Cell Background Image On Css?
leiaah
post Jun 15 2005, 12:14 PM
Post #1


Super Member
*********

Group: Members
Posts: 436
Joined: 21-January 05
From: Koronadal City, Philippines
Member No.: 3,358



I wanted to have a button that changes the skin/theme of my site using css and php. I've already had the php code for switching between two different css but I don't know how to put an image background for each cell using css.

Can anyone help me? Sample codes would be nice. huh.gif
Go to the top of the page
 
+Quote Post
SystemWisdom
post Jun 15 2005, 02:35 PM
Post #2


Advanced Member
*******

Group: Members
Posts: 117
Joined: 3-May 05
From: A Canadian South of the 49th Parallel
Member No.: 6,544



Some browsers support the background attribute in <TD> tags, but it is not a part of the standard.. meaning it will not validate under HTML4.01 or XHTML.. But that's not what you're looking for...

To do the same with CSS you can use the style attribute combined with the 'background-image' property as in:

CODE

<table>
<tr>
  <td style="background-image: url(relative_path/my_image.gif)">My Cell</td>
</tr>
</table>


The code above will validate under both HTML 4.01 and XHTML..

I hope that helps!
Go to the top of the page
 
+Quote Post
badinfluence
post Jun 16 2005, 01:10 AM
Post #3


Super Member
*********

Group: Members
Posts: 283
Joined: 10-October 04
Member No.: 1,637



hey, i cant answer right now yet..but you can have some reference from this sites..

QUOTE


hope, find out some smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. My First Image(12)
  2. Image Weaver(0)
  3. For Anyone Who Wants To Have Compact Image Gallery(4)
  4. Move/delete Image On Webpage Automatically?(2)
  5. Image Splicer?(1)
  6. Rollover Image Tutorial(2)
  7. Avoid Image Download(6)
  8. Great Background Images(2)
  9. Great Background Images(1)
  10. Syndicated Image Feeds(0)
  11. Image Refresh(5)
  12. Image Galleries(10)
  13. Making A Scroll Bar In Flash(4)
  14. How Do You Enlarge An Image?(8)
  15. Hoverbox Image Gallery(1)
  1. Selecting Specific Part Of Image And Adding Description(6)
  2. How Do I Put A Flash Image In My Website(10)
  3. Image Not Taking The Right Size In Web Page(1)
  4. Ie 6 Display Problem(5)
  5. Image Anywhere(2)
  6. Image Calling Problem Solved(1)
  7. Cascading Windows(5)


 



- Lo-Fi Version Time is now: 6th September 2008 - 05:32 AM