Click here to get back home

Help with styles and hot links

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Help with styles and hot links Rich Sagall 04-04-2006
Get Chitika Premium
Posted by Rich Sagall on April 4, 2006, 11:36 am
Please log in for more thread options


I have a table with a number hot links. I want to define the text in the
table. I also want the underlines to disappear from the links and to
have the text change to red when the cursor is on the text.

Here's what I have so far:

<table width="100%" cellspacing=5 border="0"
style="font-family:'Arial';text-decoration:none; font-size:90%;">

It changes the font to Arial and sizes it correctly. However, the
underline remains. I am not sure the correct syntax for adding the hover
options to this code.

Thanks,

Rich

Posted by Jukka K. Korpela on April 4, 2006, 11:48 am
Please log in for more thread options


rich.sagall@pobox.com (Rich Sagall) wrote:

> I have a table with a number hot links.

Redesign the page then. Can't give any details because you didn't.

> I want to define the text in the table.

Parse that does but meaning your statement lacks.

> I also want the underlines to disappear from the links

Stop wanting that. Problem solved.

> and to
> have the text change to red when the cursor is on the text.

That makes more sense, though only because the popular browser still does not
use "hover" color by default. Simply set

:link:hover, :visited:hover { color: red; background: white; }

with the background setting tuned as needed.

> Here's what I have so far:
>
> <table width="100%" cellspacing=5 border="0"
> style="font-family:'Arial';text-decoration:none; font-size:90%;">
>
> It changes the font to Arial and sizes it correctly.

It's ugly markup, but apart from text-decoration, there would not be anything
fundamentally wrong _if_ you had tabular data with so many columns that it
pays off to take all the risks caused by font size reduction, in hope of
making the data fit better.

> However, the underline remains.

Fine. Stop trying to create problems.

> I am not sure the correct syntax for adding the hover
> options to this code.

Well, you're wrong, and your question seems to revolve around CSS, not HTML,
so you're in the wrong group. However, the abuse of tables is somewhat of an
HTML issue, and the answer is that you should use <ul> to set up a list of
links.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Posted by cis148 on April 4, 2006, 1:46 pm
Please log in for more thread options


Setting style definitions inline is an easy way to become familiar with
how they work. Add the following inside your <HEAD> tag:

<style type="text/css">
.myTable {
font-family:Arial;
font-size:90%;
}
.mytable A {
text-decoration:none;
}
.myTable A:hover {
color:red;
}
</style>

Then change your <table> tag to this:

<table width="100%" cellspacing=5 border="0" class="myTable">

Now your table will use the styles specified in the "myTable" setting,
and any <A> tags within this table will use the styles specified in the
remaining definitions.

Yucky,
Yukky Korpulent


Posted by Rich Sagall on April 4, 2006, 7:59 pm
Please log in for more thread options


Thanks - it worked like a charm.

Rich

Posted by Stan Brown on April 5, 2006, 2:38 pm
Please log in for more thread options


Tue, 4 Apr 2006 19:59:43 -0400 from Rich Sagall
> Thanks - it worked like a charm.

Whatever "it" was.

http://oakroadsystems.com/genl/unice.htm#quote

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Similar ThreadsPosted
style to remove all styles March 25, 2005, 5:09 am
text box styles in a mac enviroment May 18, 2005, 9:32 am
width and height styles on tag June 29, 2005, 3:37 pm
Apply multiple css styles to a textfield? April 25, 2005, 5:05 pm
multiple link styles without classes? May 20, 2005, 3:21 pm
CSS styles not working for anchor tags. August 13, 2005, 4:03 pm
Persistent, default and alternate styles December 21, 2005, 11:40 am
DHTML/js set text content w/ styles January 30, 2006, 5:19 am
img width height attributes vs. inline styles October 21, 2005, 1:00 pm
Dealing with overriding styles with stylesheets in Microsoft Word November 19, 2004, 7:28 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap