|
| |
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
link/text rollover question - 5/13/2004 9:20:33
What I want to try out is the following, I have a link that will change color when I do a mouse over, I know how to do this with the hover. Now, what if I want the description following the link to have a color change as well, how would I do this without Javascript?
< Message edited by c1sissy -- 5/13/2004 9:21:22 >
_____________________________
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/
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/13/2004 10:58:19
quote:
ORIGINAL: Donkey Why not just make it one big link? I had thought about that, but was wondering if there were another way to do this.(besides that sounded too easy ;>) Thanks Donkey I appreciate your response!
_____________________________
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/
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/13/2004 14:31:29
quote:
ORIGINAL: jaybee Deb www.listamatic.com all their menus are lists Been there. Still doesn't give me what I want to do. Guess I"ll have to go the way that Donkey suggests. Only thing is that I am working with a def list instead of ordered and unordered list.
_____________________________
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/
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/13/2004 15:11:45
Yes, that is what I want it to do, but I want white, and when you mouse over I get my different colors. Thanks guys,
_____________________________
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/
|
|
|
|
Giomanach
Posts: 6090 Joined: 11/19/2003 From: England Status: offline
|
RE: link/text rollover question - 5/14/2004 3:34:39
Use what JB has offered, and make sure you have the different colours in the <span> class/id. Might work Dan
_____________________________
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/14/2004 8:21:37
Try using an id. I had read this somewhere that if you are using a class, and it doesn't work, go with ID. Not sure where I read it or I would post it here for you to see.
_____________________________
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/
|
|
|
|
d a v e
Posts: 4086 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: link/text rollover question - 5/14/2004 13:27:18
i'm not clear on why you would want to do this, and if so why you can't use javascript: users with javascript disabled will still see the link function thought they would miss out on the additional text. could you post a link to an *idea* of what you're trying to do??
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4086 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: link/text rollover question - 5/14/2004 14:33:00
i didn't say i *didn't* want to know ;) I'm curious too, but i can't quite get my head around what you're trying to...
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4086 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: link/text rollover question - 5/15/2004 8:51:53
how about the first-child pseudo element? (well what about it?!!) I thinking a long the line of using the first line and to modify the link style. so you have one link stlye (say green text on hover) but over-ride the first line (using the first line pseudo class) and maybe use important to do this and make the text red (or whatever) http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo well ,maybe... of course you might put some padding/margin after when you define the first line style to give the appearance of a line break/paragraph break.
_____________________________
David Prescott Gekko web design
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/15/2004 10:37:46
Ok guys, here it is, forget the nav for a second. I have two lines written in black words. Line one, when I hover over it, I want just the background, not the words to change to yellow.(or whatver color) Line two, when I hover over it, I want just the background, not the words to change to say grey. Now as far as the underline goes, that would be put in there as a no underline if you are using the anchor linking process of doing this. Now I read in Eric meyers book, that there is something called the bare hover. Which you could then use for paragraphs etc... Not sure if this would work or not. Later today I am going to try to research the term and see what it comes up with
_____________________________
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/
|
|
|
|
Donkey
Posts: 3869 Joined: 11/13/2001 From: Blackfield United Kingdom Status: offline
|
RE: link/text rollover question - 5/15/2004 11:20:15
I thought you wanted to make, for instance, hovering over line one change lines one and two. I've just adapted some code I use for an in-line button effect and it will do what you describe above. In the CSS file:/*TURNS BACKGROUND YELLOW*/
a.yello{
display:block;
width: 100%;
padding: 0 0 0 0;
border; 0 0 0 0;
margin: 0 0 0 0;
background-color: transparent;
color: #000;
text-decoration: none;
text-align: center;
font-size:1em;
font-family: tahoma,helvetica,sans-serif;
font-style: normal;
}
a.yello:link{
width: 100%;
text-decoration: none;
}
a.yello:visited{
width: 100%;
text-decoration: none;
}
a.yello:hover{
width: 100%;
background-color: #FFC;
font-style: normal;
color: #000;
text-decoration: none;
}
a.yello:focus{
width: 100%;
text-decoration: none;
}
a.yello:active{
width: 100%;
background-color: #FFC;
color: #000;
text-decoration: none;
}
/*TURNS BACKGROUND GREY*/
a.grey{
display:block;
width: 100%;
padding: 0 0 0 0;
border; 0 0 0 0;
margin: 0 0 0 0;
background-color: transparent;
color: #000;
text-decoration: none;
text-align: center;
font-size:1em;
font-family: tahoma,helvetica,sans-serif;
font-style: normal;
}
a.grey:link{
width: 100%;
text-decoration: none;
}
a.grey:visited{
width: 100%;
text-decoration: none;
}
a.grey:hover{
width: 100%;
background-color: #699;
font-style: normal;
color: #000;
text-decoration: none;
}
a.grey:focus{
width: 100%;
text-decoration: none;
}
a.grey:active{
width: 100%;
background-color: #699;
color: #000;
text-decoration: none;
} And in the html:
<a class="yello" href="/your link">First line here</a>
<a class="grey" href="/your link">second line here</a> You will need to change colours, font size, padding, margins etc. to suit and you may be able to cut down the code slightly by using shorthand versions and leaving some lines out, but that code does work.
_____________________________
I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't. Samuel Clemens
|
|
|
|
caz
Posts: 3520 Joined: 10/10/2001 From: Somewhere south of Chester, UK Status: offline
|
RE: link/text rollover question - 5/16/2004 7:30:23
I came up with this about bare hover: http://devedge.netscape.com/viewsource/2003/arbitrary-hover/ Any use, Deb? <edited for link correction>previous link was not working anymore<c1sissy>
< Message edited by c1sissy -- 10/4/2004 18:11:32 >
_____________________________
Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard. Cheshire cat. www.doracat.co.uk I remember when it took less than 4hrs to fly across the Atlantic.
|
|
|
|
c1sissy
Posts: 5084 Joined: 7/20/2002 From: NJ Status: offline
|
RE: link/text rollover question - 5/16/2004 8:00:41
Thanks Carol, I did find the same thing. Now it is a matter of getting all of the information to connect the dots in my head to do this. Thanks everyone for your imput. Pretty interesting article isn't it Carol?
_____________________________
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/
|
|
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
|
|
|