Oct 21, 2001 #1 DeepBlerg Technical User Jan 13, 2001 224 AU Hi guys, This is a pretty stupid question but I'm new to CSS. In my stylesheet I would like to define two styles for <a> links, how doI refer to them in the stylesheet and in the html script? Thanks.
Hi guys, This is a pretty stupid question but I'm new to CSS. In my stylesheet I would like to define two styles for <a> links, how doI refer to them in the stylesheet and in the html script? Thanks.
Oct 21, 2001 #2 mackey333 Technical User May 10, 2001 563 US you have to name your style like so: name.a {} name2.a {} you can replace name with whatever you want, then call it like this: <a href="http://www.aol.com" class="name">click</a> -Greg :-Q Upvote 0 Downvote
you have to name your style like so: name.a {} name2.a {} you can replace name with whatever you want, then call it like this: <a href="http://www.aol.com" class="name">click</a> -Greg :-Q
Oct 25, 2001 Thread starter #3 DeepBlerg Technical User Jan 13, 2001 224 AU Hi, I tried your solution but it doesnt seem to work, this is what I have in the stle sheet: normal.a { text-decoration: underline; font-weight: bold } normal.a:link { color: blue } normal.a:visited { color: purple } normal.a:active { background: yellow } normal.a:hover { background: yellow } navi.a { text-decoration: underline; font-weight: bold } navi:link.a { color: black } navi:visited.a { color: black } navi:active.a { background: yellow } navi:hover.a { background: yellow } and this is how I refer to it in the html script: <a href="products.shtml"; class="navi">Products</a> <a href="services.shtml"; class="normal">Services</a> What am I doing wrong? Thanks. Upvote 0 Downvote
Hi, I tried your solution but it doesnt seem to work, this is what I have in the stle sheet: normal.a { text-decoration: underline; font-weight: bold } normal.a:link { color: blue } normal.a:visited { color: purple } normal.a:active { background: yellow } normal.a:hover { background: yellow } navi.a { text-decoration: underline; font-weight: bold } navi:link.a { color: black } navi:visited.a { color: black } navi:active.a { background: yellow } navi:hover.a { background: yellow } and this is how I refer to it in the html script: <a href="products.shtml"; class="navi">Products</a> <a href="services.shtml"; class="normal">Services</a> What am I doing wrong? Thanks.
Oct 25, 2001 #4 Boomerang Programmer Mar 30, 2001 766 NL Hi DeepBlerg, It's : a.navi { text-decoration: underline; font-weight: bold } a.navi:link { color: black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Further I think you do: a.navi {text-decoration:underline; font-weight:bold; color:black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Instead of: a.navi { text-decoration: underline; font-weight: bold } a.navi:link { color: black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Hope this helps, Erik Upvote 0 Downvote
Hi DeepBlerg, It's : a.navi { text-decoration: underline; font-weight: bold } a.navi:link { color: black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Further I think you do: a.navi {text-decoration:underline; font-weight:bold; color:black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Instead of: a.navi { text-decoration: underline; font-weight: bold } a.navi:link { color: black } a.navi:visited { color: black } a.navi:active { background: yellow } a.navi:hover { background: yellow } Hope this helps, Erik
Oct 25, 2001 #5 toolkit Programmer Aug 5, 2001 771 GB Also Do not have a semicolon in the tag: NOT: Code: <a href='...'; class='...'>...</a> BUT: Code: <a href='...' class='...'>...</a> Cheers, Neil Upvote 0 Downvote
Also Do not have a semicolon in the tag: NOT: Code: <a href='...'; class='...'>...</a> BUT: Code: <a href='...' class='...'>...</a> Cheers, Neil
Oct 25, 2001 #6 mackey333 Technical User May 10, 2001 563 US oops, sorry...i got it backwards LOL -Greg :-Q Upvote 0 Downvote