PDA

View Full Version : anyone know how to do this


rph105
10-25-2007, 10:56 PM
on this website www.mattbrett.com under "PREVIOUS ENTRIES" hes got this table, now when u roll the mouse overthe table it changes colour, but is not a link, and if you roll over the link it changes colour, would anyone know how to do this?

edbr
10-26-2007, 04:23 AM
do you mean changing the background colour? i coudnt see whar you meant unless it is that.
its done with a hover and background if thats what you meant.
from the code
.home-blog:hover a:hover, .home-portfolio h2:hover a:hover, .home-blog a:hover, .home-portfolio h2 a:hover, .content:hover p a:hover, .content:hover li a:hover, .content:hover h1 a:hover, .content:hover h3 a:hover, .sidebar:hover a:hover, #design-sidebar:hover a:hover {
color: #000;
text-decoration: none;
border-bottom: 1px solid #ed145a;
background-color: #ed145a;
}

Cary
10-26-2007, 05:15 AM
Unfortunately, this doesn't work in IE6 and only partially when using the whatever:hover (http://www.xs4all.nl/%7Epeterned/csshover.html) csshover.htc file.

Here's the basic styling:

body {
background: #000;
text-align:left;
behavior:url("csshover.htc"); /* allows hover in IE6 on non-anchor elements */
}
table {
width: 430px;
}
table td {
padding: 3px 0;
color: #777;
border-bottom: 1px solid #333;
}
table tr:hover {
background-color: #111;
}
table a:link, table a:visited {
color: #ccc;
text-decoration: none;
}
table:hover a:link, table:hover a:visited {
color: #fff;
}
table a:hover {
color: #000;
text-decoration: none;
}
table:hover a:hover {
color: #000;
background-color: #ed145a;
}
table a:active {
color: #ccc;
text-decoration: none;
}
table:hover a:active {
color: #fff;
}

chriskq
10-26-2007, 08:20 AM
no such thing as

table:hover a:hover {
color: #000;
background-color: #ed145a;
}

Atomico™
10-26-2007, 09:12 PM
Unfortunately, this doesn't work in IE6
Because IE sucks

Cary
10-26-2007, 11:08 PM
no such thing as

table:hover a:hover {
color: #000;
background-color: #ed145a;
}

Both Opera and Firefox understand it, though it is redundant. You won't usually be able to hover over a link within a table without hovering over the table itself at the same time.