CSS Links Help...

  • Thread starter Jpec07
  • 6 comments
  • 471 views
5,842
Forgotten Wing
Alright, here's the deal. I have a site with an embedded CSS at the top to modify text (mainly formatting and all that stuff). What I want to know is; is there a way to make more than one link tag operation using just CSS (like, have one link become neon pink when you drag the mouse over it and have the other one jump up a size and become bold). I know that something like this can happen in javascript (onmouseover and onmouseout stuff), but I don't know the syntax of it to modify the text (and nowhere I look will tell me what I want to know). So please, help (no, you don't need a link, just ask questions and I'll answer; the site's not exactly on the web, I just need to know if such a thing as I am describing, written in bold text, can be done...). Thanks in advance...
 
Nope, impossible with CSS. I think the proper term for what you're describing is "disjoint rollovers", and can only be accomplished with JS, though I have no clue how.
 
Just with pure XHTML/CSS though. It's definitely possible with scripting, such as the website that Skip linked to shows. (Oof, that sentence made no sense... oh well.)
 
What do you mean impossible? All you have to do is apply seperate classes.

Code:
CSS:
a.pink:hover {color: #______;}
a.pimpin:hover {font-size: 16px; font-weight: bold;}

HTML:
<a class="pink" href="#">Neon pink like Zamataki</a>
<a class="pimpin" href="#">Pimpin' y0!</a>

Any link with class="pink" will be pink when hovered over and one with class="pimpin" will upsize the text to 16px and make it bold. Fairly basic stuff.

Edit: Javascipt? Bad bad. If your site relies on Javascript, it is instantly inaccessible to 11% of the web. Although your website doesn't rely on link effects. Just thought I'd bring it up.

Personally though, I think the majority of those are search engine spiders...
 
Hrm, I think one of us misunderstood, but I'm not sure which one (though now I'm thinking it's me). I was under the impression that he wanted a disjoint rollover, which means that when you hover over one object, another object at a different location on the page will display its own hover property. Now that I've re-read his question though, it does sound like he simply needed different types of hovers for different texts. :embarrassed:

Going along with that, too bad attribute selectors aren't supported by IE, because those things effin' rock for link usage.
 
Back