HTML table cells & font colors

Thomas Dowling tdowling at ohiolink.edu
Wed Jun 4 11:20:04 EDT 1997


>
>This is a minutely technical question so delete if you want theory. 
>

I'm not sure if this is tongue in cheek or not.  I hope we haven't become a
place where people are embarrassed to ask technical questions.

>I'm working on a draft of a template for our new library pages.  My
>working draft is at http://www.cofc.edu/~whitt/psyc.html
>
>The existing table borders will be set to "0" once the beast is working
>properly.  My understanding is that table cells require individual font
>statements.  I would like to have white links in the left hand navigation
>column and other font colors/links in the right hand column.  Every
>attempt I've made using <font color link vlink alink etc.> has failed
>for one reason or another.  I've used a variety of validators
>(http://www3.imagiware.com/RxHTML/ was the best of the lot) but haven't
>found one which can help with this problem. 
>
>Any designers out there with a moment to look at the code?  Thanks in
>advance.


Caveat: Warren Steel's font rant <URL:http://www.mcsr.olemiss.edu/~mudws/fon
t.html> is strongly recommend reading.

I don't know of any browser that will understand link, vlink, or alink
attributes in a font tag.  It certainly isn't in the DTD of any HTML
version.

    <a href="wherever"><font color="white">A Link</font></a>  

...validates against HTML 3.2.  My copies of MSIE 4.0b and Communicator
4.0b5 honor this kludge, but my copy of Opera 2.12 does not, nor do I think
it's required to do so.  As described in the font rant, a user may have
good reasons for using his or her own background colors but might not (or
might not be able to) override your font colors.  The result could be your
white links on a user's white background, which limits legibility to a
certain extent.  :-)

A more elegant solution might be to use cascading stylesheets (with a
second caveat: CSS is supported incompletely by MSIE 3.x and 4.x, and
laughably incompletely by Communicator).  You could have this line in your
stylesheet:

    A.whitelink {color: "#FFFFFF"; background: "#600060"}

(replace 600060 with the actual hex values you'd want for the background
color; you can also experiment with what happens when you don't specify a
background number--I haven't really mastered either where that's *supposed*
to be inherited from, or where any browser *actually* inherits it from.)

Then in your document, you would just do:

    <a href="wherever" class="whitelink">A Link</a>


Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu
> 




More information about the Web4lib mailing list