TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

css (again!) proper method?

Page: 1 Reply
Jan 16th 2003#86058 Report
Member since: Jan 13th 2003
Posts: 9
Hi, im stuck again, although i can get it to work in a poor manner i want to do it properly, all im trying to do is have a css file tell my page what hover link colours to do etc and have two types. but i dont know how to put too types into the css file because of the brackets

ie, say it was called .a1 then if it has nothing in its:

.a1 {}

So i want to add
[code]
a.:link { color: #666666; background-color: transparent; text-decoration: underline;}
a.:visited { color: #666666; background-color: transparent; text-decoration: underline}
a.:active { color: #666666; background-color: transparent; text-decoration: underline}
a.:hover { color: #3E549F; background-color: transparent; text-decoration: underline}[/code]

The problem is i want to add .a2 as well, its currently like this:


[code].a1
a.:link { color: #666666; background-color: transparent; text-decoration: underline;}
a.:visited { color: #666666; background-color: transparent; text-decoration: underline}
a.:active { color: #666666; background-color: transparent; text-decoration: underline}
a.:hover { color: #3E549F; background-color: transparent; text-decoration: underline}

.a2
a.:link { color: #FFFFFF; background-color: transparent; text-decoration: none;}
a.:visited { color: #FFFFFF; background-color: transparent; text-decoration: none}
a.:active { color: #FFFFFF; background-color: transparent; text-decoration: none}
a.:hover { color: #3E549F; background-color: transparent; text-decoration: none}[/code]


But that doesnt seem to work im using dreamweaver 4 and in the html im using dreamweaver to select text then im going to the menu (text>css styles>a1 etc) to choose the style.
Reply with Quote Reply
Jan 16th 2003#86063 Report
Member since: Mar 18th 2001
Posts: 6632
Reply with Quote Reply
Jan 16th 2003#86080 Report
Member since: Jan 13th 2003
Posts: 9
oh ta
Reply with Quote Reply
Feb 3rd 2003#88855 Report
Member since: Nov 29th 2002
Posts: 69
The order is also important.
Reply with Quote Reply
Feb 19th 2003#91420 Report
Member since: Feb 13th 2003
Posts: 44
Hello roy_uk,
Another option is to set your second set of links with a class selector like this:

/* Standard anchor tag formatting */
A:link {
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 13px;
text-decoration: underline; }
A:visited {
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 13px;
text-decoration: underline; }
A:hover {
color: #6C6E6B;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 13px;
text-decoration: underline;}
A:active {
color: #6C6E6B;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 13px;
text-decoration: underline;}
/* End standard anchor tag formatting */

/* Formatting for menu items */
A.menu:link {
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 10px;
text-decoration: none; }
A.menu:visited {
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 10px;
text-decoration: none; }
A.menu:hover {
color: #666666;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 10px;
text-decoration: underline;}
A.menu:active {
color: #666666;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
font-size: 10px;
text-decoration: underline;}
/* End formatting for menu items */

The first set will work on any anchor tags, and second (or third, you can have as many as you want, just change the class selector) just add class="menu" to your anchor tag like this:
[a href="blah.html" class="menu"]blah[/a] (replace [] with <>).

I hope this helps, if you need any more explenation you can just post your question, e-mail me, or check out the code on my site.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum