|
| |
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
CSS and different link colours - 7/19/2001 19:15:00
Howdy...I have a standard set of hyperlinks with behaviours set in a stylesheet, but I need to make a second set that are a different colour. Can I do that? Cheers, Bri ------------------ "Bother," said Pooh, as Piglet was assimilated by the Borg. ------------------- Work, work, work: http://www.appercept.co.uk Out of office hours: http://www.darlingbri.co.uk
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: CSS and different link colours - 7/19/2001 19:40:00
So THAT'S what "class" is for!!!  ------------------ "Bother," said Pooh, as Piglet was assimilated by the Borg. ------------------- Work, work, work: http://www.appercept.co.uk Out of office hours: http://www.darlingbri.co.uk
|
|
|
|
LB
Posts: 5551 From: Montana USA Status: offline
|
RE: CSS and different link colours - 7/19/2001 22:03:00
lmao. Thank you, Bri. I needed that.  I've been learning css this week, also... and thought I had it whipped until today. Somehow everything is falling apart in NN and I have no clue why. Check and double check in NN... if everything's working, make a second copy of your site! <paranoid? yes! -- but don't let me scare anyone away, css IS really cool> Wish me luck. If I can't figure this out, I'll post it tomorrow. To make matters worse, I finally looked at all my sites in NN6. The majority are fine, including my Outfront templates, but there are some that are going to take a bit of work to fix. <pout> Linda
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: CSS and different link colours - 7/19/2001 22:17:00
 There's still one part I can't figure out, though. They style sheet says this for my "different links": .topmenu { color: #ffffff; font-family: "Verdana"; font-size: 10pt; font-weight: bold; text-decoration: none } .topmenuhover { color: #ffffff; font-family: "Verdana"; font-size: 10pt; font-weight: bold; text-decoration: underline } And the html says this for the section where I want the "different links" : <body> <div align="center" class="topmenu"><a href="../default.htm" class="topmenu">Home</a> | <a href="../internal/contact.htm" class="topmenu">About Us</a> | <a href="../specials.htm" class="topmenu">News & Specials</a> | <a href="../internal/contact.htm" class="topmenu"> Contact Us</a></div> </body> And it's working - they're white, yippee! - but not when you hover over them. When you hover, they're the default hover colour. I know I'm doing something wrong, but I don't know what! Anyone? Cheers  ------------------ "Bother," said Pooh, as Piglet was assimilated by the Borg. ------------------- Work, work, work: http://www.appercept.co.uk Out of office hours: http://www.darlingbri.co.uk
|
|
|
|
Nancy
Posts: 3626 Joined: 11/9/1999 From: Nebraska Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:03:00
I think you have to set a class for each. Keep in mind I am as newbie as you guys on this one.you have to have .topmenu:link .topmenu:active .topmenu:hover .topmenu:visited then for each you put the attributes you want. You only apply it as class topmenu, but you have to set for each of those. In other words the class "topmenu" has to have all those selectors to make the hover work. Nancy ------------------ Wrinkled is NOT one of the things I wanted to be when I grew up! FP2K Themes and Templates DreamweaverSites
|
|
|
|
Michael
Posts: 237 From: Trabuco Canyon, CA Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:06:00
I just had to jump in on this one as I, too, have been spending a fair amount of time learing CSS this past week.I've not had any real strange things happen with NN, on the PC at least. I did experience the strangest thing with NN4.7 on the Mac, however. Setting the linked style sheet to show links in black I then used an inline style to set nav links at the bottom of the page to white (they sit in a black bar and duplicate the rollovers at the top of the page). This does NOT work in NN4.7 on the Mac, the links are still black and, therefore, invisible. As if that weren't bad enough, from the original design I had forgotten to remove the attribute that made a couple of links black (before using the linked style sheet). For some bizarre reason they were showing up bright green in NN4.7 on the Mac. There is nothing, not a THING, on the site or the linked style sheet calling out anything close to green. I removed the offending code and those links are fine. Those white links at the bottom though, still won't show in NN4.7 on the Mac or PC, but are fine in NN6 and IE5.5 on both platforms. For some strange reason they are fine in NN4.7 on Linux box, but Opera doesn't like it anywhere (PC, Mac, Linux). Ah, isn't learning fun!? :0 [This message has been edited by Michael (edited 07-20-2001).]
|
|
|
|
clum1
Posts: 762 From: Glasgow, Scotland Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:38:00
I don't know if anyone else has tried this, but I've had great success with it; Style Master from WestCiv.It's a GUI Windows and Mac tool that makes CSS a hell of a lot easier to get to grips with. There's a trial download at www.westciv.com and registration is only $50. It's not perfect (quite slow, a few bugs) but it can help you build complex style sheets really easily and it comes with ful tutorials. clum1
|
|
|
|
LB
Posts: 5551 From: Montana USA Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:28:00
I've been using Katherine's stylesheet and source code at www.inkkdesign.com for my guide, after starting off with her tutorials here. I had everything working well at one time, but one little problem cropped up in NN and when trying to fix that I messed up some other things. Oops!  Michael - Thanks for the Mac info.  clum - Thanks for the link.  Bri - take a look at Katherine's as a guide. Having the coding for each part on one line makes it easier than multi-lines.  Nancy - Hi!  I'm feeling better knowing I'm not the only one dealing with this. Yes, learning is fun ...but there are some moments that aren't!  Linda
|
|
|
|
Marr
Posts: 303 From: Lincoln, Nebraska, USA - GO HUSKERS!!! Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:23:00
Hey Bri -Your stylesheet should look similar to this: a.topmenu:link {color: #FFF8E1; text-decoration: none} a.topmenu:active {color: #FFF8E1; text-decoration: none} a.topmenu:visited {color: #FFF8E1; text-decoration: none} a.topmenu:hover {color: #CCC58A; text-decoration: none} Then Topmenu is only one classification and link your links to it. Generally - I set up different classes if they need to be different colored links etc. Say - left side navbar has one color of link and the body has another. Of course - doesn't have to be a color that differentiates them - size font etc. Marr ------------------ Marrianne Williams OutFront News Stu Reilly Design SwishToGo.com
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: CSS and different link colours - 7/20/2001 20:25:00
Thank you Marr, that kicked it up the wotsit and all is now well 
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: CSS and different link colours - 7/21/2001 18:44:00
In addition to everything mentioned above, you should validate your style sheets at the W3C CSS Validator. Great little tool, check it out!
|
|
|
|
Guest
|
RE: CSS and different link colours - 7/23/2001 14:40:00
make sure you always have the "hover" style last of all otherwise your visited links will not hover.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|