Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Basic CSS question

Reply
Thread Tools

Basic CSS question

 
 
Lee Davidson
Guest
Posts: n/a
 
      06-29-2003
I can't seem to get CSS to work for specific tags. I can when it is a
class alone, however. Here is the CSS in question:

A .blue
{
COLOR: blue;
TEXT-DECORATION: none
}
A A:visited
{
COLOR: blue;
TEXT-DECORATION: none
}
A A:hover
{
FONT-WEIGHT: bolder;
COLOR: green
}
A A:active
{
COLOR: blue;
TEXT-DECORATION: none
}

In the first case I want the link to be blue without an underline. In
the other cases, I want the link to change (hover) or not change
(visited and active same color). I had the last three as an inline
style (not in an .css file) and they worked, but now they don't as part
of the .css file.

Help.

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-29-2003
Lee Davidson wrote:

> I can't seem to get CSS to work for specific tags. I can when it is a
> class alone, however. Here is the CSS in question:
>
> A .blue


Applies to elements of .blue inside <a>.

> A A:visited
> A A:hover
> A A:active


Applies to <a> elements with various pseudo-classes inside other <a>
elements. Invalid in HTML.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
 
Reply With Quote
 
 
 
 
picayunish
Guest
Posts: n/a
 
      06-29-2003
When Lee Davidson was making a web page, a appears and wrote:
> I can't seem to get CSS to work for specific tags. I can when it is a
> class alone, however. Here is the CSS in question:
>
> A .blue
> {
> COLOR: blue;
> TEXT-DECORATION: none
> }
> A A:visited
> {
> COLOR: blue;
> TEXT-DECORATION: none
> }
> A A:hover
> {
> FONT-WEIGHT: bolder;
> COLOR: green
> }
> A A:active
> {
> COLOR: blue;
> TEXT-DECORATION: none
> }
>
> In the first case I want the link to be blue without an underline. In
> the other cases, I want the link to change (hover) or not change
> (visited and active same color). I had the last three as an inline
> style (not in an .css file) and they worked, but now they don't as part
> of the .css file.


Try this.
a.blue, a.blue:visited, a.blue:active {color: blue; background:
transparent; text-decoration: none;}
a.blue:hover {font-weight: bold; color: green; background: transparent;}
--
Edwin van der Vaart (Geen familie van....)
http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
http://www.semi-conductor.nl/ Links to Semiconductors sites
http://members.chello.nl/e.vandervaart/ Experimental site
http://host.deluxnetwork.com/~evdvaart/ Test site


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      06-29-2003
In post <>
Lee Davidson said...

> TEXT-DECORATION: none


Links Want To Be Links
http://www.cs.tut.fi/~jkorpela/www/links.html


> A:visited
> COLOR: blue;


thats the same color as your unvisited links. how is a visitor
supposed to know where they've been? why do you want to annoy your
visitors?

> A:hover
> FONT-WEIGHT: bolder;
> COLOR: green


changing the font-weight on hover may cause the window to redraw or
the text to be truncated. use some other effect to indicate hover


--
brucie a. blackford. 30/June/2003 08:47:37 am kilo.
http://loser.brucies.com/
 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-30-2003
I'm not sure I'm following this. BTW, Interdev formats the .CSS and I
don't know how to get to the raw code to change anything.

What I'm after is in certain cases of <a> tags to have the text
unhighlighted and blue. This is a name tag jump so the viewer doesn't
need to see underlining or color switches on clicking the tag.

In the second case, I want the color to change as the mouse is moved
over a group of links, but no other changes to happen. This worked when
I was using a style sheet on the page, but I want to "graduate" to using
style sheets.

I'm not sure why the "A:" appears after the "A" tag, but are you saying
it should be like the "blue" class?

Tnanks,
Lee

David Dorward wrote:
> Lee Davidson wrote:
>
>
>>I can't seem to get CSS to work for specific tags. I can when it is a
>>class alone, however. Here is the CSS in question:
>>
>>A .blue

>
>
> Applies to elements of .blue inside <a>.
>
>
>>A A:visited
>>A A:hover
>>A A:active

>
>
> Applies to <a> elements with various pseudo-classes inside other <a>
> elements. Invalid in HTML.
>


 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-30-2003
I didn't think of it in that way, that is as the visited and active as
subsets of "blue" which is a class associated with an "a" tag. I can't
get the blue to work by itself so adding the rest to it won't work until
I do.

Should there be that space between "A" and ".blue" or is that just
something that visual interdev is helpful to add?

Thanks,
Lee

picayunish wrote:
> When Lee Davidson was making a web page, a appears and wrote:
>
>>I can't seem to get CSS to work for specific tags. I can when it is a
>>class alone, however. Here is the CSS in question:
>>
>>A .blue
>>{
>> COLOR: blue;
>> TEXT-DECORATION: none
>>}
>>A A:visited
>>{
>> COLOR: blue;
>> TEXT-DECORATION: none
>>}
>>A A:hover
>>{
>> FONT-WEIGHT: bolder;
>> COLOR: green
>>}
>>A A:active
>>{
>> COLOR: blue;
>> TEXT-DECORATION: none
>>}
>>
>>In the first case I want the link to be blue without an underline. In
>>the other cases, I want the link to change (hover) or not change
>>(visited and active same color). I had the last three as an inline
>>style (not in an .css file) and they worked, but now they don't as part
>>of the .css file.

>
>
> Try this.
> a.blue, a.blue:visited, a.blue:active {color: blue; background:
> transparent; text-decoration: none;}
> a.blue:hover {font-weight: bold; color: green; background: transparent;}


 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-30-2003
Thanks for your input. Unfortunately, my question was about syntax and
not style. If I can 't get the syntax down, then everything else is moot.

Any suggestions as to why the style isn't working will be greatly
appreciated.

Lee


brucie wrote:
> In post <>
> Lee Davidson said...
>
>
>> TEXT-DECORATION: none

>
>
> Links Want To Be Links
> http://www.cs.tut.fi/~jkorpela/www/links.html
>
>
>
>>A:visited
>> COLOR: blue;

>
>
> thats the same color as your unvisited links. how is a visitor
> supposed to know where they've been? why do you want to annoy your
> visitors?
>
>
>>A:hover
>> FONT-WEIGHT: bolder;
>> COLOR: green

>
>
> changing the font-weight on hover may cause the window to redraw or
> the text to be truncated. use some other effect to indicate hover
>
>


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      06-30-2003
In post <>
Lee David said...

> I'm not sure I'm following this.


i have the same problem, its probably because you're topposting

How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

--
brucie a. blackford. 30/June/2003 12:12:16 pm kilo.
http://loser.brucies.com/
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      06-30-2003
Lee David pounced upon this pigeonhole and pronounced:
> I'm not sure I'm following this. BTW, Interdev formats the .CSS and I
> don't know how to get to the raw code to change anything.


Instead of just clicking the .css file to open it, right-click and choose
Open With... then pick the Source Code (Text) Editor

Set this editor as Default so the VI wizard thingy doesn't mess up your
structure after you repair it.

--
-bts
-This space intentionally left blank.
 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-30-2003
Thank you very much. I'll try it first thing in the morning.

Lee

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: correction: A question about css (was: A question about css) richard HTML 12 03-09-2010 08:52 PM
CSS Basic Question ethanjones88@gmail.com HTML 6 09-16-2007 03:55 PM
Basic CSS Content Placement Question Rangy HTML 2 03-08-2007 07:47 PM
Basic CSS positioning Question?? Spartanicus HTML 11 09-06-2004 04:58 AM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57