Jump to content

Html


Transattic

Recommended Posts

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

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

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

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 by Transattic

Share this post


Link to post
Share on other sites

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

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

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 by d3bruts1d

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...