Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Hover color change question
Old 10-14-2010, 05:00 AM Hover color change question
Banned

Posts: 408
Name: mushget
Trades: 0
Hi,

This is for a University assignment, I have this title which has 3 words, the second 2 words are links and the first is not. The links are set up to change color when hovered over but unfortunately cant work out how to get the first word to not change color. Here's the code from the page:
Code:
<div class="pic">
<br />
<h3>Assessment 1:<a href="week_1.html"> Before</a> | <a href="week_1a_TEMP.html">After</a></h3><br>
<br />
<img src="images/pic2.jpg" alt="My Assessment 1 Site" style="border: 3px solid #ccc;" />
<br />
</div>
And the code from the style sheet:
Code:
.pic 
{
float: right;
width: 468px;
padding: 0 20px 20px 20px;
text-align: justify;
}
.pic h3 
{
padding: 0px 0 0px 0;
margin-bottom: 0px;
color: #B0FFBD;
font-size: 16px;
font-weight: 100;
}
.pic h3 a 
{
color: #B0FFBD;
text-decoration: none;
}
.pic h3 a:hover 
{
color: #eee;
}
Any help would be greatly appreciated, thanks!
mushget is offline
Reply With Quote
View Public Profile Visit mushget's homepage!
 
 
Register now for full access!
Old 10-14-2010, 05:07 AM Re: Hover color change question
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
you need to take out the "h3" from the hover class:

HTML Code:
.pic a:hover {
color: #eee;
}
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 10-14-2010, 04:26 PM Re: Hover color change question
Novice Talker

Posts: 8
Name: andy
Trades: 0
Can you change the width of the image in the hover state without effecting the rest of the page?
sch5811 is offline
Reply With Quote
View Public Profile
 
Old 10-14-2010, 07:41 PM Re: Hover color change question
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
you need to take out the "h3" from the hover class
Why? his ".pic h3 a" will ONLY target <a>'s inside an h3 inside of something with the .pic class, which is what he wants, and it works just as it is.

Quote:
Can you change the width of the image in the hover state without effecting the rest of the page?
Not unless the width is the same in both cases, with and without the hover, otherwise things will jump around when you hover.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-14-2010, 07:51 PM Re: Hover color change question
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
otherwise things will jump around when you hover.
Not necessarily

set visibility: hidden; on the original image ( so it still takes up the same space and show an absolutely positioned wider image.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Hover color change question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.53576 seconds with 12 queries