Help - Search - Members - Calendar
Full Version: CSS Table Help
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
SLS
Hi, everybody! Why I posted this is because I need help doing something with a CSS table. What I need help with is that how do you make an image become a background of a cell in CSS, or can you do that in CSS? Because I know you can do that in HTML. unsure.gif
pandy
The same way as you use a background image with any other element. CSS basically doesn't care about if it's a P, a DIV, a TD or any other element.
http://htmlhelp.com/reference/css/color-ba...background.html

If you want the background for just one cell of many, you have to use a selctor that singles that cell out. If nothing else fits, class the TD.

CSS;
CODE
.rumpelstiltskin    { background: #abc012 url(background.jpg) }


HTML
<td class="rumpelstiltskin">...</td>
SLS
QUOTE(SLS @ Jul 12 2007, 01:55 PM) *

Hi, everybody! Why I posted this is because I need help doing something with a CSS table. What I need help with is that how do you make an image become a background of a cell in CSS, or can you do that in CSS? Because I know you can do that in HTML. unsure.gif

Hi, Pandy! Thank you for your help because you answered my questions!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.