Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Inline 1

Status
Not open for further replies.

jamie2

Programmer
Jul 26, 2005
1,127
US
I saw a question regarding CSS Hover inline coding... However I can not find the post.

<html>
<head>
<style>

a:link{ text-decoration: none;
color: red;
}

a:visited{ text-decoration: none;
color: blue;
}

a:hover{ text-decoration: none;
color: green;
font-weight: bolder;
letter-spacing: 2px;
}

</style>
</head>
<body>
<h2>CSS Style Inline</h2>
<p>This is a <a href=" me to Google</a> !</p>
</body>
</html>
 
The original post was because the person could not use external or embedded css, if you can, then use it.
otherwise you could use javascript, failing that it's

Code:
<BODY TEXT="#FFFFFF" LINK="#FFFF00" VLINK="#33FF33" ALINK="#FF0000" BGCOLOR="#000000" >

you'll notice no a:hover and you can only set the colour property.

javascript way was.

Code:
<a href="[URL unfurl="true"]http://google.com"[/URL] onmouseover="this.style.color='red';this.style.fontWeight='bolder'" onmouseout="this.style.color='blue';this.style.fontWeight='normal'">google</a>

you could call a function when mouse over/out too would be easier if you have a few links, needless to say the css
external or embedded way is far simpler.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top