Takin a dip in the CSS pool...

liunx

Guest
Well I am finally going to go swimming the the CSS pool. I have read a couple tutorials and I see a way that CSS could be useful for me, but I can't figure out how to make it work.<br />
<br />
My Goal: Set up links to display in different colors in different columns on a table. I have a green border background on my site and the content area is white. I would like to use standard link colors in the contents area. I would then like to use different colors in the border/nav area.<br />
<br />
What I am trying: I wanted to use the colgroup command available in tables to have the nav column do the following colors: link=blue, alink=red, vlink=blue, hlink=yellow<br />
I have 30 text links in that column and I do not want to use in-line styles for each link. I would like the content areas to have the standard set of colors. I could probably set up a CSS command set in the head area for all links and then use in-line styles for the content area links, but I would like to use the colgroup or span commands.<br />
<br />
Any suggestions?<!--content-->If I understand your question, it might be possible to do something like that. But if it is, I have no idea. <br />
<br />
It is easy to define seperate classes in the head section or by linking to a style sheet. Then refer to the class name in the anchor tag.<br />
<br />
Just in case you're not familiar with classes here is a short example:<br />
<br />
In the head section define the properties like so:<br />
<br />
<STYLE type="text/css"><br />
<!--<br />
a.one {<br />
color: blue;<br />
text-decoration: underline;<br />
font-size: 9pt;<br />
font-family: 'Times New Roman';<br />
}<br />
<br />
a.two {<br />
color: maroon;<br />
text-decoration: none;<br />
font-size: 8pt;<br />
font-family: Verdana,Arial;<br />
}<br />
--><br />
</STYLE><br />
<br />
<br />
and then reference the class name in the anchor tags in the body:<br />
<br />
<a class="one" href=http://www.htmlforums.com/archive/index.php/"music.htm">Music</a><br />
<a class="two" href=http://www.htmlforums.com/archive/index.php/"art.htm">Art Collection</a><br />
<br />
<br />
you can use any name to define your classes, one and two are just examples.<br />
<br />
Regards,<br />
Kevin<!--content-->I'm trying to effect links in different parts of the table without going in and hand coding each link. Even if it is cut and paste! I have about 30 links in the left nav columnn, and I don't feel like changing them one by one, plus these same links are on 30 different pages. 900 changes by the time I am done.<br />
<br />
Could you give me the syntax for the in-line changes, and I will try to attach them to a span or colgroup tag and see what happens?<br />
<br />
I'm trying to get:<br />
link=blue text decoration=none<br />
alink=red text none<br />
vlink=blue text none<br />
hover=white text decoration=underline<br />
<br />
Can all of this be done in an in-line style tag?<!--content-->The problem is that you are in a table and there are inheritance problems at the TD level in all the current browsers.<br />
<br />
Try this declaration form:<br />
<br />
.CELLcls a:xxxxxx {attributes}<br />
<br />
That says all links within the scope of the class.<br />
<br />
Then in the HTML <td class="CELLcls"><br />
... and the links...<br />
<br />
That should apply the style to all links in the cell. If not you will have to put a span inside the cell and apply the class to the cell. <br />
<br />
Of course if there is only one link to cell, it's not much help because you still end up having to apply it to each one.<br />
<br />
BTW, the hover is not supported by Netscrap 4.x<!--content-->
 
Back
Top