Adventure Game Studio

Community => General Discussion => Topic started by: Igor on Sat 22/11/2003 17:30:17

Title: HTML question
Post by: Igor on Sat 22/11/2003 17:30:17
I'm just working on my web site and i stumbled into a problem- at the moment, no matter what i try, html always add a line under text links...
So i was wondering if there's a way to make text links without that blasted under-line?

Thanks in advance!
Title: Re:HTML question
Post by: Pau on Sat 22/11/2003 17:36:47
Maybe this is what you are looking for, here you have a sample:

<BODY>
<P><SPAN STYLE="text-decoration: none">link-to-my-page</SPAN> (http://www.paused.tk/)</P>
</BODY>

Title: Re:HTML question
Post by: Darth Mandarb on Sat 22/11/2003 18:09:26
Pau got it with his too.  But there's another way.  You define a style, in the <head></head> tag area, for links like this:


<style type="text/css">
<!--
.links
 {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 10px;
   color: 000000;
   text-decoration: none;
}
-->
</style>


You can call the .links whatever you want so you'll remember it.

Then, in your links, you do this:

<a href="yourlink.html" class="links">Your Link Here</a>

Using this you can also create mouseOver effects by doing this (you'd need to create the mouseOver style as well (just change the color or something))

<a href="yourlink.html" class="links" onMouseOver="this.className='linksOVER'" onMouseOut="this.className='links'">You Link Here</a>


Hope this helped!

Have fun!!

]).]v[.
Title: Re:HTML question
Post by: Evil on Sat 22/11/2003 18:43:50
BWAHAHAHAHA! My geocities account has teh option to do somethign such as this! HARARA! LOOK At My R)x0r W3bpaGe!!!1!&(69651

www.takeoff.to/harryspage

editL: sorry for the pimping...
Title: Re:HTML question
Post by: Igor on Sat 22/11/2003 23:51:57
Ah, thanks a bunch Pau and DM! :)

Btw, cool site Evil- i like crazy fonts!
Title: Re:HTML question
Post by: Ishmael on Mon 08/12/2003 10:51:10
Sorry for diggin' this ol' thead up, but I playing around with these things, and they work great, except for one thing: when the page (upper frame, I have frameset for 'rows') is loaded, the links are on the color set in <body bgcolor = .... link = ...>, underlined and so on, and when I put the mouse over them, they are set correct, font to Arial and underlining off, and on when mouse is over...

Is there a way to get around this? Well, of cource there is, but where?
Title: Re:HTML question
Post by: TerranRich on Mon 08/12/2003 13:55:58
This is the correct way to do it:

In the <HEAD>...</HEAD> area of the web page, add this:

<STYLE TYPE="text/css">
<!--
A {
text-decoration:none;
}

A:hover {
text-decoration:none;
}
-->
</STYLE>

The <!--  ...  --> tags are there to keep the code commented in case your browser doesn't support it and decides to blurt out your code...although most browsers should, by right, support everything by now.

Using this, you could also define the colors (even a background color for hovering links) and font weight links. And you only have to use the regular <A...></A> tags the normal way.

This is called Cascading Style Sheets (CSS) and you can visit http://www.w3.org/Style/CSS for more information on it. :)
Title: Re:HTML question
Post by: Miez on Mon 08/12/2003 15:27:28
CSS takes some getting used to, but once you've discovered it you'll never want to go back to the old '<font face="Arial....' tags etc.
And if you have a somewhat larger website, you can also put all your CSS definitions in a textfile, call it "anything.css", smack it on your server and link to it in all your pages. That makes changing the whole appearance of your website soooo easy.
A link to an external CSS file goes in the <HEAD> ... </HEAD> bit of your page and looks like this:

<LINK REL="StyleSheet" HREF="anything.css" TYPE="text/css">
Title: Re:HTML question
Post by: Darth Mandarb on Mon 08/12/2003 15:40:36
terran - That is the easiest way to do it.  The reason I don't do it that way is because I always have (well usually) two or more link types in my websites.  Like, 1 type that is underlined, and one that is not.

If you redefine that <a></a> tag like that, all links in the page will follow that definition and if you want a certain link to be underlined you can't have it.

Miez is right ... once you start using CSS you'll begin to wonder how you ever got on without it!  I equate it to photoshop and layers.  When layers were first introduced I hated them ... now I wonder how I ever thought that!

])]v[
Title: Re:HTML question
Post by: Ishmael on Mon 08/12/2003 20:54:29
Thank you, wonderful people! This is exactly what I needed. :)

/me bows and quickly fixes a typo