• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Html

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

stan03

Member
Joined
Mar 30, 2003
How can i make links fade like the links on this forum? and how can i specify the origional and fade colors? thanks
 
links fade?

you mean like a visited link be a different colour then an unvisited link?


you would just set

link = somecolour vlink =somecolour in your body settings
 
w3schools
great resource for html. they're all about css though, but you can look up most anything you can do with html and xhtml.

if things are changing colors that probably means javascript, w3schools also has a tutorial for that.
 
move your mouse over a link on this site, like "overclocking" you see how it fades to yellow, and after you move your mouse away fades back to grey/gray? thats what im talking about.
 
yea, that's just CSS..

you can put this in your stylesheet
a {
color: (original color);
text-decoration:none }
a:visited {
color: (original color);
text-decoration:none }
a:active {
color: (original color);
text-decoration:none }
a:hover {
color: (hoverl color);
text-decoration:underline (this would also underline the text when you hover over it, can also be none, overline, line-through) }

if you aren't familar with stylesheets, check out w3schools, or just ask.
 
Last edited:
im using dreamweaver, i forgot to say that, does that make a difference?
 
i'm not familiar with dreamweaver, i just use notepad. you can try and paste this in your head:

<style type="text/css">
a, a:visited, a:active, {
color:#000000; }
a:hover {
color:#ffcc00; }
</style>

if there is already a <style> section, just add the code to it. it should work for the whole page. this will make all of your links black, until they are "mouse-overed", in which case they will turn yellow. in-line style declarations will override this, as well as more specific declarations in the style sheet, such as:

td a:hover {
color:#ffffff; }

this would make all of the links, when they are "mouse-overed" turn white; but only if they are an elemt of the td, because it is more specific.

-------------------------------------------------------------
edit:
scratch all of that. i was wondering what you were talking about with the fading, cause it didn't look like fading to me. the "fading" doesn't work in mozilla, so scratch all of that above crap. it IS in fact done with javascript. I not real good with .js but you can usually finde pre-writtin scripts on the internet that do what you want them to do... anyway, if you look in the source code for this page you'll see a line that says something like <script ... blah blah.js> </script>
(there's probably a few of them) the particular script is not written in the soucre, it's a link to an outside script file... so on, so fourth...
anyway, you can find a similar code to do what you want here:

Link fader Script
 
Last edited:
edit: ok, i downloaded that, it doesn't seem to work very well. after i click on a link, the fader stops working... am i doing something wrong?
 
i downloaded it and it's working just fine. make sure to remove any
a:hover tags, as the website says.
the start of your document should look something like this:

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="StyleSheet" href="style.css" type="text/css" />
<title>blah blah </title>
<script src="fader.js" language="Javascript"></script>
</head>
<body> etc. etc.


i think dreamweaver is probably putting inline "link" and "vlink" attributes.. you might need to remove those. is your page on the web already? maybe if i saw it i could help.
 
i think it got it man :D WHOOO, yi can't show my happyness right now :D... its not uploaded yet cause its only fragments. ill post it as soon as i got it.

oh and the reason it messed up was i forgot to remove a hover on all the pages :p

thanks alot for you help so far.
 
no problem, i'm new to overclocking, so i can't really help in the other forums to much, so it's nice to give back...

btw.. that version of the fader works for mozilla as well..
 
How can i change a font using css? in dreamweaver the preview shows the font changing, but when i preview in IE, the font goes back to Times New Roman
 
what font are you trying to use? -internet explorer might not be able to display that font correctly... if you are using something out of the ordinary.
otherwise you could use

body {
font-family:Verdana, Arial, Helvetica, Sans-Serif; } <-prioritized fonts

also, dreamweaver might be placing inline tags on the sections of text.. you'll need to remove those for a global css tag to work.

if you're interesting in what css can do, check out:

csszengarden it's a basic page, with no formatting other than div id's, that people format using css.
 
yea i was trying arial. that is exactly what font i was using. what you have excetp i just don't have family... does it need to be there? cause in dreamweaver preview it works fine, just not in any internet programs
 
try changing the font to something other than arial (not times) and see if it works in the browser. try the font family declaration if that doesn't work, then check to see if there's a more specific tag somewhere.

that bar is actually just several pictures sliced up and put into a table. It's not too hard to do, the had part is the graphic design. I think dreamweaver can do all the slicing and positioning for you, but i've never used it.
 
the font-family thing worked, thanks alot.
so techdot just made a picture, and the cut it up?
 
if you use mozilla you can see what i mean (it's free www.mozilla.org). i don't think internet explorer allows you to do this. just open the page with mozilla and right click on a part of the bar. go to view image, and it will show you what image is there. the links are small boxes, and the bar itself is a small rectangle that is repeated horizontally... looks like they used a program to do it.
 
Back