473,395 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help with styles and hot links

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
Apr 4 '06 #1
6 1209
ri*********@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

Apr 4 '06 #2
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

Apr 4 '06 #3
On Tue, 4 Apr 2006 11:36:59 -0400, ri*********@pobox.com (Rich Sagall)
wrote:
<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.


You can't. Setting the properties for a link requires you to use the
:link, :visited, :hover, etc. pseudo-elements, and that's needs to be
done from a stylesheet, not an inlined style attribute.

It's also a good thing to ditch inline CSS in favour of stylesheets.
Inline is a last-resort, try to avoid it.

Get any decent CSS book. I suggest "Lie & Bos" as a good readable one
that's also accurate.
Apr 4 '06 #4
Thanks - it worked like a charm.

Rich
Apr 5 '06 #5
Tue, 4 Apr 2006 19:59:43 -0400 from Rich Sagall
<ri*********@pobox.com>:
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/200..._wont_help_you
Apr 5 '06 #6
The solution to the problem, chucklehead.

Yucky,
Yukky.

Apr 5 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Steve | last post by:
Hello, I am writing a script that calls a URL and reads the resulting HTML into a function that strips out everthing and returns ONLY the links, this is so that I can build a link index of various...
1
by: AdamsBlueGuitar | last post by:
Here's the situation. I have a page with 2 tables on it. In table one, are several links. The I want the content of the links to show up in table two. I think this can be done by nameing table...
2
by: Glenn | last post by:
Dynamic help topic links show properly and search brings up links, but when any link is clicked I receive a "Page Cannot be displayed message in the Explorer window and the title bar of Visual...
1
by: Mike Bell | last post by:
Ok.... I'm trying to build my own custom calendar control for a first custom control practice project. For this control I'm deriving from the table class. I have created a new class called CalCell...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
1
by: Grzegorz ¦lusarek | last post by:
Hi all. I have situation that i use layers in my site and have to upload file from form on that layer. I try used AJAX it failed, when I do standard submit it's failed too, so I hear that solution...
1
by: roberto321 | last post by:
Hi Guys, I was wondering if someone could help me out with the following requirements <mydocument> <div id="other"> <a href="linkother">linkother</a> </div> <div id="hello">
4
by: Coleen | last post by:
Hi All :-) I'm not sure where to post this, but my organization is looking for a good software application that is not terribly expensive that allows you to create documentationand help files and...
1
by: upcircle | last post by:
I am very new to the xml world and currently working with a flash drop down button from awssoft. The problem that I am having is trying to figure out how to add liks to an XML file. Can anyone...
2
by: snk11 | last post by:
hey, i'm trying to make this website and i can't figure out how to make it so that there isn't a BOX around my links. I have an image as a link, and there is this blue box that won't go away. This...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.