Transattic Posted September 15, 2003 Posted September 15, 2003 i need to just make a seperate style for this link on the same page, and the one i used <style> on the top affects that link even if i put another set of <style> in front of the link. I was seeing if anyone knew how to make for example: a:link {text-decoration:none; color:white} a:visited {text-decoration:none; color:white} A:hover {text-decoration:none; color:gray} a:active {text-decoration:none; color:black} for a seperate link w/o directly affecting any other links. Share this post Link to post Share on other sites More sharing options...
General912 Posted September 15, 2003 Posted September 15, 2003 Ok First of all this isnt HTML its CSS they are different. And what i think your saying is how can you make it work. Put it in the head tage with <HEAD> <STYLE> BODY{ a:link: text-decoration:none; color:white, a:visited: text-decoration:none; color:white, A:hover: text-decoration:none; color:gray, a:active: text-decoration:none; color:black } </STYLE> </HEAD> <BODY> Share this post Link to post Share on other sites More sharing options...
d3bruts1d Posted September 15, 2003 Posted September 15, 2003 I think this is what you are after... In the .css file, make seperate entries for the different types of links you want. For examle, .menuLink { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; text-transform: none; color: #890000; text-decoration: none; } .bodyLink { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #c0c0c0; text-decoration: none; } then when making a link, in the < A HREF .... > tag, add this class="menuLink" somewhere in it to use that style, or class="bodyLink" to use the other style. You can add the class=" " to any html code, such as <P>, <TD>, <TR>, <SPAN>, and others. Share this post Link to post Share on other sites More sharing options...
Transattic Posted September 15, 2003 Posted September 15, 2003 (edited) YES! D3 is da Masta!!!! I actually put my script into each html because i was too lazy to actually make a seperate css... but thanks alot man! its good to know people like you. btw, general, you were close, yet you got good info also... i guess thats a different way i coulda done. Edited September 15, 2003 by Transattic Share this post Link to post Share on other sites More sharing options...
General912 Posted September 15, 2003 Posted September 15, 2003 Yeah im ok a html guru but CSS im a little rusty on. Im a student aid for programing the web classes. Share this post Link to post Share on other sites More sharing options...
d3bruts1d Posted September 15, 2003 Posted September 15, 2003 I actually put my script into each html because i was too lazy to actually make a seperate css... I like making a seperate CSS better. That way if I add/delete something from the CSS, it's automatically changed in all pages. Just add this line in each page to link it to a CSS file: <link href="css_file.css" rel="stylesheet" type="text/css"> Share this post Link to post Share on other sites More sharing options...
Transattic Posted September 15, 2003 Posted September 15, 2003 yah, i got that into my html... you know, i couldnt use your css since thats only for general font and background... it has nothing to do with making indiv. link styles... but i got it figured out: a:link {color:08296b; text-decoration:none}a:visited {color:08296b; text-decoration:none} a:hover {color:blue; text-decoration:none} a:active {color:blue; text-decoration:none} this was for the regular link a:link.pi {text-decoration:none; color:white}a:visited.pi {text-decoration:none; color:white} a:hover.pi {text-decoration:none; color:gray; cursor:default} a:active.pi {text-decoration:none; color:black} this is for the 2nd kind of link (i named it pi, what do you know, i may be doing something with pi) Share this post Link to post Share on other sites More sharing options...
d3bruts1d Posted September 15, 2003 Posted September 15, 2003 (edited) I use those styles for individual links. - But yes, your way will work as well. The only a: anything that I use is a:hover { text-decoration: underline; } You can see my different links @ http://www.d3bruts1d.com The menu uses on type of link style, where as anywhere OverClockersClub.com is in the news, it uses a different link style. My CSS file can be seen here: http://d3bruts1d.com/d3css/d3_main.css Edited September 15, 2003 by d3bruts1d Share this post Link to post Share on other sites More sharing options...
VolcomPimp Posted September 16, 2003 Posted September 16, 2003 bah I love css.... its a little wierd at first but then once ya start seein all the stuff you can do w/ it and how it saves you so much time cause all you have 2 do is add a class tag instead of tons of lines..... pretty soon you write the page in css then add the tag and you spend most of your time not even editing your html.... mostly I like it cause you dont have to be scrolling the whole time like in html... like if you know you wanna change somethin in a table or a whole bunch of things at once, you can just switch to your style sheet and make the change... Share this post Link to post Share on other sites More sharing options...
mikeock Posted September 16, 2003 Posted September 16, 2003 i get all fo my coding help, not to diss on all of the people that helped here, from w3schools Share this post Link to post Share on other sites More sharing options...
VolcomPimp Posted September 21, 2003 Posted September 21, 2003 same here... w3schools is the best!!! anyone tried out dreamweaver mx 2004 yet??? I just installed the demo earlier but Ive hardly touched it so far... I hear it has a lot better support for css, php etc.... Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now