Author Topic: Adding a visited link color  (Read 7629 times)

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26388
  • 27" iMac (mid-17), Big Sur, Mac mini, Catalina
    • View Profile
    • Mid-South Weather
Adding a visited link color
« Reply #15 on: December 17, 2007, 11:49:22 AM »
Kimmer,
You are correct, the styles you created will apply to every link on the site/page. The fix for having different styles in different places is easy, of course, and is exactly what CSS is for. I do the same thing for links in my main navigation bar (actually a horizontally displayed list), the page nav list on the right-hand side of each page and other links in the body of the page. Just create a class for each type/location for those links.

a.menubutton:link {blah, blah, blah...;}
a.menubutton:visited {blah, blah, blah...;}
a.menubutton:hover {blah, blah, blah...;}
.
.
.
a.text:link {blah, blah, blah...;}
a.text:visited {blah, blah, blah...;}
a.text:active {blah, blah, blah...;}
.
.
.
a.whatever:kind_of_link...

Then, in the "menu" div, for example just use:
<a class="menubutton" href=".....">Home</a>

Then, in the "body" section, for example just use:
'...some interesting <a class="text" href=".....">some interesting text 'link'</a> in a paragraph...'

Note, you don't specify whether it is a "link", "active", "hover", etc. The browser does all that work, all you need to do is tell it which style to use in that area of the page with the 'class="..." ' label.

Jane,
"Borrowing" page layouts/designs as well as CSS techniques can help you understand the html/CSS. But cutting and pasting is a good way to create problems for yourself if you don't understand exactly what all the code does! That may be the only consequence you suffer, but it can be a very big one and waste a lot of time. The hardest part of a good site is the design part, as far as I'm concerned. The color palette, consistent page layout, paragraph, link, headline, sub-heads, sidebars, header/footer details...if all that is not helpful and easy to find/use, the viewers simply will not return or use the site as often as you might want. Of course, moving all the styling info to a style sheet makes the html much more compact and easier to edit but you'll probably find that you'll then be doing most of your 'tweaking' in the style sheet rather than in the html. ;-)
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Adding a visited link color
« Reply #16 on: December 17, 2007, 01:36:11 PM »
I am finding that as I go along in the lessons with Dreamweaver that its becoming easier for me to actually get what I want to have the page look like.
At first I really didnt know what the page would look like, but now, in the Design mode, you see it as you construct.  Then switch back to the code or have it split screen, and its all beginning to come together for me now.
Then when I get a page I really like the looks of, I try to model the others after it for that particular photo album, might have several pages linked together.  I havent gotten to the point of having the thumbnails lead to the big picture yet, its all right in Dreamweaver, but its a long learning process.  THere is another class in just CSS, and I am thinking to take that one when I feel as if I am ready.
Now that I can do more, I am experimenting around with it and its working!  What a program!   I can now get a pretty decent looking page, and I just love the graphics part, and am finally getting to use some of my stuff and pictures.

I guess that I really dont want to use the templates, though I see some of the amazing photo albums that the TS people have made here.  So I will just keep on with pbase.com and dot mac for the photo albums that need the thumbnails and that fancy stuff. But there sure is a great feeling to make your own page from scratch!  I really enjoy it.
Jane