This is a discussion on "change colour of text, on hover." within the Web Page Design section. This forum, and the thread "change colour of text, on hover. are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
change colour of text, on hover.
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
change colour of text, on hover.
i have the following code..
how can this be done. thanks |
|
|
|
#2
|
|||
|
|||
|
Re: change colour of text, on hover.
Play around with the color.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Last edited by Monie; Sep 27th, 2007 at 04:28. |
|
#3
|
||||
|
||||
|
Re: change colour of text, on hover.
In order to do a hover effect you need to either have the hover command in css and link the css from ur page... Or just place it in tags in your head section.. Couple of examples below...
CSS:
Last Blog Entry: My blog? (Oct 18th, 2007)
|
|
#4
|
||||
|
||||
|
Re: change colour of text, on hover.
Quote:
Stew
__________________
WelshStew If you think I've helped, click the "Thanks" tierney rides tboard - uk site | xtreme wales - extreme clothing WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
|
|
#5
|
|||
|
|||
|
Re: change colour of text, on hover.
Yeah, I forgot about that....
Thanks for correcting that one. Another way is to refer it the parent div element. Let say the link is in your div called "menu", and you can put the link style in:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
#6
|
|||
|
|||
|
Re: change colour of text, on hover.
I have used this method as i seem to understand it more, i am still new to CSS.
I have already used h1 so i changed the h1 in your code to h2 and tried it but did not work <a href="somelink" target="_blank" class="h2"><h1>some text</h1></a> the underline is still there and the colours seem to be the same i have a test file below that i am using.
Quote:
Last edited by Jason3107; Sep 27th, 2007 at 08:41. |
|
#7
|
||||
|
||||
|
Re: change colour of text, on hover.
h1 is not the div name (class) but the attribute.
if you change the css back to the above and change your code to the following it should work:
__________________
WelshStew If you think I've helped, click the "Thanks" tierney rides tboard - uk site | xtreme wales - extreme clothing WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
|
|
#8
|
||||
|
||||
|
Re: change colour of text, on hover.
p.s. you can assign div (class) many number of times across your page. this allows you to cut down on the amount of duplicate css code that you develop.
however, you can only use id's once within a div class look at some of karinnes resources to get a good understanding for css attribute. Good luck Stew
__________________
WelshStew If you think I've helped, click the "Thanks" tierney rides tboard - uk site | xtreme wales - extreme clothing WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
|
|
#9
|
|||
|
|||
|
Re: change colour of text, on hover.
so i should do away with my original css code?
i have tried this and i now get the same thing still but the text is very large! Quote:
|
|
#10
|
||||
|
||||
|
Re: change colour of text, on hover.
change only this
__________________
WelshStew If you think I've helped, click the "Thanks" tierney rides tboard - uk site | xtreme wales - extreme clothing WebForumz - facebook | LinkedIn
Last Blog Entry: Phorm approved for UK rollout (Sep 17th, 2008)
Last edited by welshstew; Sep 27th, 2007 at 09:19. Reason: close the code |
|
#11
|
|||
|
|||
|
Re: change colour of text, on hover.
I read somewhere on the forum (probably the CSS stickies) that the order of links in css should follow LoVe HAte
a:link a:visited a:hover a:active don't know why it should be like this but that's what it says |
|
#12
|
|||
|
|||
|
Re: change colour of text, on hover.
this is what i have now after stripping all the text and pics.
the top container is what it should look like but the colours are not correct, i want them black text always but white when hovered over. the bottom containers does not show correctly the second line of text in it is not inline with the first line of text, the colours in the bottom container are correct. what is wrong with the code?
|
|
#13
|
|||
|
|||
|
Re: change colour of text, on hover.
Is this what you are looking for
|