4 replies [Last post]
nix
nix's picture
Offline
Enthusiast
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Last seen: 12 years 52 weeks ago
(n): a position or site occupied or available for occupancy or marked by some distinguishing feature
Timezone: GMT-4
Joined: 2003-08-12
Posts: 159
Points: 0

Hey guys! Haven't been here for a while. The place has really picked up!

Heres the issue I've been having. I have a navigation bar in a table, and when you hover, they highlight. But now what I have to do is get the button that they have clicked on to remain highlighted.

heres my code:

/* This one is for the highlighting of the current button that has been clicked. This doesn't work */
td.current  {
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#ffffff',endColorStr='#dcdcdc',gradientType='0');
width: 100%
}

/* This one is for the hovering of the different buttons. This works */
.highlight td :hover{
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#ffffff',endColorStr='#dcdcdc',gradientType='0');
background-color: #F0F0F0;
width: 100%;
} 

...

<table ... class="highlight">
        <tr> 
          <td class"current" ><a href="index.htm">Home</a></td>
        </tr>

I refuse to be like the faceless masses of sheep and have a signatu......awwwwwwwww CRAP!!

Backups? Ha! I've never had troub**&{[}$$ERROR NO CARRIER

rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 11 years 10 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

class name filter problems

oh I see, when you declare td:hover this action will only work in certain browsers. I think it only works in Netscape Navigator and broswers along them lines. It wont work in IE though.

When you say it works, I dont think the actual gradient is working. I think it is just changing the backgrond colour to grey?

hope this is helpfull
Rees

The Cyber World

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 43 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

class name filter problems

As far as I know, in IE the :hover pseudo-class will only work properly with anchors. I believe this is a fault with IE. As for changing a bg colour on click, I'm pretty sure you'll need to do this with JavaScript. I can't help you any further because I haven't a clue what the "filter:progid:DXImageTransform.Microsoft.Gradient" stuff is all about!

Life's a b*tch and then you die!

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 4 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

class name filter problems

filter:progid:DXImageTransform.Microsoft.Gradient

means a FILTER will be applied, with a PROGID of DXIMAGEetc etc. This is so the filter knows what to do. TRANSFROM will transform it, MISCROSOFT means it's an MS only thing, and GRADIENT will aplly a gradient.

Verschwindende wrote:
  • CSS doesn't make pies

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 43 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

class name filter problems

thepineapplehead wrote:
MISCROSOFT means it's an MS only thing

Yes, I guessed as much, which is why I immediately lost the will to live and couldn't even be bothered to find out for myself what it was all about Sad

Me; biased - never! Wink

Life's a b*tch and then you die!