|
| |
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
Cell Background Color Change - 5/13/2004 17:28:42
How do I change the background color of a cell using an extenral CSS? Here is the current code inside the css: .side_nav2 {
color: #000000;
border: 1px solid #6C8593;
background-color: #E7EEF1;
}
a.side_nav:link {
color: #000000;
border: 1px solid #6C8593;
background-color: #E7EEF1;
}
a.side_nav:hover {
color: #000000;
border: 1px solid #6C8593;
background-color: #000000;
} Basically using CSS I want to be able to have a hover effect over the actual cell. Not just the background color for text, but the entire cell... Any ideas?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Cell Background Color Change - 5/13/2004 19:17:18
This is what works for me: CSS #side_nav_bg a
{
display: block;
padding: 2px;
background-color: #68818D;
border: 1px solid #6C8593;
}
#side_nav_bg a:link, #navlist a:visited
{
color: #ffffff;
text-decoration: none;
}
#side_nav_bg a:hover
{
background-color: #3B316D;
color: #ffffff;
} HTML <td id="side_nav_bg"><a href="#">Link Number 1</a></td>
< Message edited by BobbyDouglas -- 5/13/2004 19:19:25 >
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: Cell Background Color Change - 5/14/2004 12:00:48
I posed this exact question last week and the great hairy one informed me that this just isn't possible without using a javascript. I haven't scoured the code you post above, but was i mislead by the banana eater?
_____________________________
You look like you're about to do something stupid. I'm in.
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: offline
|
RE: Cell Background Color Change - 5/14/2004 14:53:30
Well your question was about tables, mine is directed at cells. Maybe you cannot do this with tables, but it does work with cells.
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
Mehrdad
Posts: 1 Joined: 11/24/2004 Status: offline
|
RE: Cell Background Color Change - 11/24/2004 2:31:29
Hi Cell Background Color Change with using CSS : simple and useful! (see to cell2) --------------------------------------------------------------- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>css test</title> <style> td.normal {background-color: #ffffff;} td.over {background-color: #ff9900;} </style> </head> <body> <div align="center"> <table border="1" width="180" id="table1" dir="ltr" cellspacing="0" cellpadding="0"> <tr> <td align="center"><font face="Tahoma">cell 1</font></td> </tr> <tr> <td align="center" onmouseover="className='over'" onmouseout="className='normal'"> <font face="Tahoma">cell 2</font></td> </tr> <tr> <td align="center"><font face="Tahoma">cell 3</font></td> </tr> </table> </div> </body> </html>
|
|
|
|
Giomanach
Posts: 6075 Joined: 11/19/2003 From: England Status: offline
|
RE: Cell Background Color Change - 11/24/2004 3:32:57
Uses JavaScript..not fully CSS....
_____________________________
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|