navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Cell Background Color Change

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Cell Background Color Change
Page: [1]
 
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
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Cell Background Color Change - 5/13/2004 18:01:34   
HTML

<td><a href="hyper.html">text text text</a></td>

CSS

a:link, a:visited {
color: #666666;
background-color: #ff9900;
}

a:hover {
color: #ff9900;
background-color: #666666;
}

This works for me, yours is similar, what problem are you having?

[edit] on second look, you seem to be trying to do a nav bar. Try looking at the options they have in www.listamatic.com. There are loads there and you can swipe the code. It may give you an idea of what you're doing wrong.

I'm just off to bed but if you're still stuck in the morning I can take another look then.

PS. You're missing an a. on your first line.

< Message edited by jaybee -- 5/13/2004 23:10:34 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to BobbyDouglas)
BobbyDouglas

 

Posts: 5432
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Cell Background Color Change - 5/13/2004 18:53:59   
That only does TEXT background. Not CELL background.

I will take a look further into that one link. It looks like there is a lot of information, unfortunately it is mainly for lists.

Hopefully it will work without lists too :)

Thanks !!!

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to jaybee)
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

(in reply to BobbyDouglas)
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Cell Background Color Change - 5/14/2004 2:33:41   
Ahhhhh yes. Oooops. Just noticed I managed not to cut and paste the display block bit. The code I use is

a:link, a:visited {
display: block;
color: #666666;
background-color: #ff9900;
border-bottom: 20px #b7b7b7 solid;
padding-top: 3px;
padding-bottom: 3px;
text-decoration: none;
font-size: 3em;}

Oh well, there's nothing like finding it out for yourself for making it stick, she says grovelling. :)

What can I say.... it was gone midnight.

< Message edited by jaybee -- 5/14/2004 7:50:17 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to BobbyDouglas)
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.

(in reply to jaybee)
c1sissy

 

Posts: 5079
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: Cell Background Color Change - 5/14/2004 12:11:34   
quote:

was i mislead by the banana eater?

LIL
I have never seen Mhaircaish mis lead anyone with any of his information.:)

< Message edited by c1sissy -- 5/14/2004 12:11:57 >


_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to lilblackgirl)
jaybee

 

Posts: 13972
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Cell Background Color Change - 5/14/2004 12:32:35   
Are you sure it was the exact same question? The Great Hirsute one isn't given to getting things wrong.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to c1sissy)
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

(in reply to jaybee)
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>

(in reply to BobbyDouglas)
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....

_____________________________




(in reply to Mehrdad)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Cell Background Color Change
Page: [1]
Jump to: 1





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