Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add Diff Current and Hover Link to P Tag

0 views
Skip to first unread message

Sarah C

unread,
Nov 25, 2009, 2:34:03 PM11/25/09
to
Would like to add current, active, and hover link colors to <P> tag within
CSS file that differ from body.

My attempts have been unsuccesful thus far and will appreciate any offerred
solutions.

Thank you,
Sarah

Sarah C

unread,
Nov 25, 2009, 6:17:02 PM11/25/09
to
Resolved ..... I created a separate class in the CSS file and used a <span>
tag calling the class in the html file.

Cheryl D Wise

unread,
Nov 25, 2009, 10:50:56 PM11/25/09
to
Why add unnecessary html code?

p a {definition for hyperlinks inside a p tag )

See http://w3schools.com to learn how descendent selectors work.

--
Cheryl D Wise
http://by-expression.com

"Sarah C" <Sar...@discussions.microsoft.com> wrote in message
news:ED1708FF-6547-418B...@microsoft.com...

Sarah C

unread,
Nov 26, 2009, 1:25:01 PM11/26/09
to
Thanks Cheryl. Your reply was all I needed ... removed the html and simply
added below to style sheet. It was putting it all on one line that I was
missing previously.

p a:link, a:hover,a :visited {color: #c00000; text-decoration: none
}

"Cheryl D Wise" wrote:

> .
>

Sarah C

unread,
Nov 26, 2009, 1:51:01 PM11/26/09
to
UPDATE - Actually...... Firefox displays as expected with the line I added to
the style sheet however IE7 reacts differently.

IE7 seemingly reverts to the body link of color white and a hover link of a
very light yellow which I do not see nor recall putting into the style sheet.

Thoughts?

"Cheryl D Wise" wrote:

> .
>

KathyW

unread,
Nov 27, 2009, 2:04:02 AM11/27/09
to
Post a link to your published page. We have no idea, otherwise, what else is
in your CSS.

Sarah C

unread,
Nov 27, 2009, 7:28:02 AM11/27/09
to
Thanks Kathy .. was getting to ready to post css/html ... especially since
both CSS and HTML validated fine ... except for my continued use of
improperly coded use of ampersands.

No matter what I did though, Firefox picked it up perfectly and IE7 would not.

Finally, I have resolved the issue ..... although not really sure why IE7
made me do this ...... still have to test in IE6/8 but am hopeful. Here is
what I did:

Directly below the body tag in the style sheet I placed this:

a:link {color: #054e98; text-decoration: none}
a:visited {color: #054e98; text-decoration: none}
a:hover {color: #054e98; text-decoration: none}

and then directly below the footer class in the style sheet I listed exactly
this:

.footer a:link {color: #ffffff; text-decoration: none}
.footer a:visited {color: #ffffff; text-decoration: none}
.footer a:hover {color: #ffffff; text-decoration: none}

The only thing after that was an EOF comment. Now IE7 resolves just as
FF3.x anc Chrome do. I see no reason why this was necessary as what Cheryl
suggested previously should have worked for all.

Thanks again ... and thank you Cheryl ..... unless I run into an issue with
IE6/8, this thread should be over.

- Sarah

Cheryl D Wise

unread,
Nov 27, 2009, 3:24:17 PM11/27/09
to
You need to include the p before each of the states after the commas.

--
Cheryl D Wise
http://by-expression.com

"Sarah C" <Sar...@discussions.microsoft.com> wrote in message

news:0CDBFFB1-A81D-49A2...@microsoft.com...

Sarah C

unread,
Nov 27, 2009, 8:36:01 PM11/27/09
to
Thanks Cheryl. Updated my style sheet. Very much appreciated.

- Sarah

"Cheryl D Wise" wrote:

> .
>

KathyW

unread,
Nov 28, 2009, 2:51:01 AM11/28/09
to
Comments below

"Sarah C" wrote:

> Thanks Kathy .. was getting to ready to post css/html ... especially since
> both CSS and HTML validated fine

That does not assure you that all browsers, even modern ones, will display
it the same. There are places in the standards that are not specific and can
be intepreted differently, and not all browsers interpret them the same. All
browsers have defaults for things you don't explicitly set - and those
defaults are not all the same. And while IE7 is more standard than IE6, it
is not as compliant as IE8. In summary, no browsers are exactly matched on
how they follow, or if they are fully following, the standards. You'll
always have to test in multiple browsers and decide if any differences are
worth chasing down.


Sarah C

unread,
Nov 28, 2009, 4:08:02 PM11/28/09
to
Understood and appreciated. I gave up long ago on trying to have everything
match exactly from IE to FF to Mac Safari(more obvious). As you said though,
there are times where something stands out and is resolvable for which my
perfectionist tendencies come out to play.

Thanks again.

0 new messages