...

View Full Version : a:hover on a make believe link



briintex1
01-06-2004, 11:11 PM
I was wondering if you could use a a:hover on an underlined text, for instance call it with a class, but my only problem there is I have it calling a class already? I did'nt know if it was possible to have underlined text-(that looks like a link) call multiple classes and then in one of those classes use it to change colors?

hrp2171
01-06-2004, 11:21 PM
You probably could use the text-decoration property with the a:hover selector/pseudoclass.

a:hover
{
...
text-decoration: underline;
}

I'm not sure myself as I'm just starting my journey through CSS.

briintex1
01-06-2004, 11:32 PM
I have a text-decoration in the text class of the css I did'nt know if the text class could call the hover class, or there was a way to get the hover function on regular text, to make it look like the other links on the page.

mindlessLemming
01-07-2004, 01:12 AM
You can do it with a little inline javascript but i'm not gonna go there. (Leaves space for someone else to give .js solution...)

It is possible with CSS, but the browser support is pathetic. (Mainly IE ignoring it completely :( )

Put this in the <head> of your doc. or put the styles in your CSS file <<better idea



<style>
#fake{
color:#000000;
text-decoration:underline;
}
#fake:hover{
color:#0000FF;
}
</style>


Then assign "fake" as the id of the <span> or <p> or even <h1-6> of your fake link.

I have no idea why you want to do this, good luck:thumbsup:

dodgerida67
01-07-2004, 04:56 AM
<style type="text/css">
a:hover { text-decoration: underline; }
</style>

Paul Jr
01-07-2004, 05:15 AM
Some inline JS, perhaps?


<p onmouseover="this.style.textDecoration='underline'; " onmouseout="this.style.textDecoration='none';">
Dolore vero consequat vel veniam enim commodo vel praesent hendrerit vulputate vel minim duis in nulla dolore commodo ex dolore dolore. Iriure amet ad ipsum facilisi ut dolore esse

nisl dolore autem ipsum accumsan. Iusto vel tation nisl wisi eros suscipit consequat dolore et molestie exerci. Nulla te ullamcorper ad facilisi vel nostrud dolor iusto ullamcorper nostrud in

qui ullamcorper minim nonummy. At nibh ad odio exerci luptatum ipsum nostrud zzril dignissim duis veniam molestie. Ad sed suscipit duis in praesent lobortis dolor iusto feugait vulputate

iriure te autem in nulla.</p>

mindlessLemming
01-07-2004, 10:13 AM
Originally posted by mindlessLemming
[B](Leaves space for someone else to give .js solution...)


Good stuff Paul, that's the one I was thinking of:o

me'
01-07-2004, 07:42 PM
Try this (http://www.xs4all.nl/~peterned/csshover.html).

oracleguy
01-07-2004, 09:31 PM
Originally posted by mindlessLemming
I have no idea why you want to do this, good luck:thumbsup:

I am curious as well, why do you want something that looks like a link?

mindlessLemming
01-08-2004, 01:48 AM
Originally posted by me'
Try this (http://www.xs4all.nl/~peterned/csshover.html).

Great article, but I had to read the source, that :hover colour change for <p> text was just abusive.
That rates as my favourite inaccessible site of the day:D (Except for my own...f#%^'n free servers and their crashes/downtime/crap:mad: )

briintex1
01-08-2004, 07:46 AM
The main reason I asked if I could make a fake link was because if I had a popup window with javascript and had a line that said close window then when a person goes over that line it would do the same things as my links on my other pages. But the problem is there are some people that have a pop up blocker that blocks the pop up from my page, or java script will be blocked that page is then useless...now I move onto something better making a web page without tables...I hope that is not to hard...

mindlessLemming
01-08-2004, 08:03 AM
Originally posted by briintex1
...now I move onto something better making a web page without tables...I hope that is not to hard...

If comparing how hard it is to how essential it is... its a piece of cake:thumbsup:

briintex1
01-08-2004, 08:37 AM
haha But really thanks for all of the help I do really appreciate it, do you know any good links for designing a web page without tables and with the CSS, that would start from step 1? I have tried to find some good books to buy but have no where to start...once again thanks for all of the help everyone has given to me:D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum