7 replies [Last post]
piloo
Offline
newbie
Last seen: 7 years 7 weeks ago
Joined: 2007-01-23
Posts: 5
Points: 0

Hello,

Does anyone here knows a good tutorial for subclasses with CSS?
I am just so desesperate. As soon as I start to create a subclass it just does not work and I end up asking friends and so on.

I would really aprreciate if you know a good web page to go to.

While I am bosering you,

Could you please told me what is wrong with this please Smile
OIt just does not work and I don't know what to do subclass obviously!

.small a link, a:visited {color: "white"; font-family: Arial Black; font-size: 10pt; text-decoration: none;}, a:active{color: "white"; font-family: Arial Black; font-size: 10pt; text-decoration: none;}

.small a hover {color: "#004080"; text-decoration:"none"}

Thanks a lot for any advice,

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 34 weeks 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

What's a subclass? And

What's a subclass? And there's two problems with your code - you're missing the : between the a and what follows in some cases and don't put " " around the values in your CSS.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 14 weeks 15 hours ago
London
Joined: 2004-06-06
Posts: 15650
Points: 2788

oops was just about to ask

Laughing out loud oops was just about to ask "what's a subclass?"

I think some basic tutorials are in order try yourhtmlsource or htmldog for starters to get a grasp of some basics.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

piloo
Offline
newbie
Last seen: 7 years 7 weeks ago
Joined: 2007-01-23
Posts: 5
Points: 0

Hello, thanks a lot, for you

Hello, thanks a lot, for you advice, after looking carefully, I have tried to do my pseudo class again as follow.
Unfortunately it is still not working!
I have already have a category where I describe what should look like a link.
so the gial if this class is to make some links smaller (smlink). I do not understand what to do and do not have any problem to make simpler pseudo class as well!

.smlink:link { color: white; font-family: Arial Black; font-size: 10pt; text-decoration: none }

.smlink:visited
{
color: white;
font-family: Arial Black;
font-size: 10pt;
text-decoration: none
}

.smlink:active
{
color: white;
font-family: Arial Black;
font-size: 10pt;
text-decoration: none
}

.smlink:hover
{
color: #004080;
text-decoration:none
}

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 34 weeks 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

The hover state has to come

The hover state has to come before the active state and the way you've set up your CSS the class has to applied to the anchor itself. Showing us your HTML as well would be useful.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

piloo
Offline
newbie
Last seen: 7 years 7 weeks ago
Joined: 2007-01-23
Posts: 5
Points: 0

Hello, Thank you very much

Hello,

Thank you very much for your reply.

I have just tried to do what you told me. It still not working.
I believe that there might be a kind of conflict with the general link category in my css.
Which is as follow.

a:link, a:visited{color: "white"; font-family: Arial Black; font-size: 12pt; text-decoration: none;}, a:active{color: "white"; font-family: Arial Black; font-size: 12pt; text-decoration: none;}

a:hover {color: "#004080"; text-decoration:"none"}

img {
border-style: solid;
border-width: 4px;
border-color: #004080
}

.pagetitle {color: "white"; font-family: Arial Black; font-size: 12pt; text-align: center; font-weight: bold;}

.noBorder img {border:none;}
and apply it to selected images as:

.smlink:link
{
color: white;
font-family: Arial Black;
font-size: 10pt;
text-decoration: none
}

.smlink:visited
{
color: white;
font-family: Arial Black;
font-size: 10pt;
text-decoration: none
}

.smlink:hover
{
color: #004080;
text-decoration:none
}

.smlink:active
{
color: white;
font-family: Arial Black;
font-size: 10pt;
text-decoration: none
}

As regard my html code it is like that

www.landboard.co.uk The UK Landboarding Community Website

It woulod be great if you could explain me what is wrong on that one.

Thanks in advance.
Pierre-Louis

thepineapplehead
thepineapplehead's picture
Offline
Guru
Milton Keynes
Last seen: 14 weeks 4 days ago
Milton Keynes
Joined: 2004-06-30
Posts: 9668
Points: 801

Er . . . you don't have a

Er . . . you don't have a doctype Wink

Verschwindende wrote:
  • CSS doesn't make pies

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 34 weeks 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

You've applied the class to

You've applied the class to the paragraph, not directly to the anchor (as I already pointed out), so your CSS should be:

.smlink a:link {} .smlink a:visited {} .smlink a:hover {} .smlink a:active {}

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference