PDA

View Full Version : Quick HTML question.



Loony BoB
08-13-2003, 03:26 PM
Is there any way to set up HTML so that no underline appears under the links, regardless of what the browser's settings are?

crono_logical
08-13-2003, 03:45 PM
<a href="http://www.eyesonff.com/forums/" style="text-decoration: none; color: white; cursor: default">This paragraph is a link. Click me please :D There's only a <b>style="text-decoration: none; color: white; cursor: default"</b> stuck inside the A tags to remove the underline, leave it white like normal post text, and prevent the cursor from changing :p </a>

There's also a way to do it with STYLE tags in the HEAD, but I can't remember how :p

Loony BoB
08-13-2003, 03:51 PM
There's also a way to do it with STYLE tags in the HEAD
If anyone can help me with that, it'd be apprecciated. =)

Flying Mullet
08-13-2003, 03:55 PM
Here's style in the header tags:
&lsaquo;STYLE TYPE="text/css"&rsaquo;
&lsaquo;!--
a:link.BoBLink { text-decoration: none }
a:active.BoBLink { text-decoration: none }
a:visited.BoBLink { text-decoration: none }
--&rsaquo;
&lsaquo;/STYLE&rsaquo;

This way you can define different looks for an "untouched" link, a link that's been visited, and when the mouse pointer hovers over a link.

Then you would define your link as such:
&lsaquo;a class="BoBLink" href="webaddress"&rsaquo;link text&lsaquo;/a&rsaquo;

The above definition can also be moved to an external stylesheet if your heart so desires and the contents of file would like like this:

a:link.BoBLink { text-decoration: none }
a:active.BoBLink { text-decoration: none }
a:visited.BoBLink { text-decoration: none }

And then to include the stylesheet in the html you would put this in your header tags:
&lsaquo;link rel=stylesheet href="BoBstylesheet.css" type="text/css"&rsaquo;

Where "BoBstylesheet.css" is where the stylesheet lives(much like you define the source of an image. Then the link would be called the same way.

Oh, and stylesheets must have the filetype ".css" on the end.

Loony BoB
08-13-2003, 03:59 PM
Huzzah. It was for all the links, but it looks like if I just remove the .BoBLink stuff then it'll automatically adjust all links on the page to work like that. Thankya muchly, both of you. *learns something new*

Flying Mullet
08-13-2003, 04:01 PM
No problem. Yeah, not giving the links a class will treat all of them the same way, but if you ever want different links to act differently, you can use the class attribute to distinguish between the two(or three or however many).