• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS styling links question

 
Ranch Hand
Posts: 71
2
Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to style links on a web page, I can not get the links to display the link color of the a:link{} pseudo class, all I can get is the visited color even when I did not visited the link in the first place.

Here is my code:




Thanks,

Bill
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems to work as expected for me.

Is there perhaps other styling that is coming into play? Have you used the browser debugger to inspect the applied styles?
 
Bill foster
Ranch Hand
Posts: 71
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

I'm actually using notepad++ and when I open my webpage in FireFox, it seems that the color in the a:link{} pseudo class is set by the browser.
I noticed that you use jfiddle to test your CSS, is this a better editor than notepad++?


Okay I got to use jfiddle to post the code!

I'll post the code as soon as I can get it on jfiddle.




Thanks,
Bill
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To post HTML, be sure that the "disable HTML in this message" checkbox is checked.

JSFiddle isn't an editor. It's a good tool to test out or share code.
 
Bill foster
Ranch Hand
Posts: 71
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my HTML code:

HTML code
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The links look correct to me. What's the problem?
 
Bill foster
Ranch Hand
Posts: 71
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The link after the NSF where is says <here> is green the other two links are correct.
Here that I'm refering to has bold tags around it.

Thanks,

Bill !
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They'll be red until you visit the link. Then they'll be green forever*. I assume you've visited the target of the links? If so, they will be green, not red.

If that's not what you want, you'll need to change the CSS to reflect what you are after.






* Or until the link isn't in your browser history anymore.
 
Bill foster
Ranch Hand
Posts: 71
2
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bear,

I had one of my students from last semester actually show me how to clear the history in the browsers that I have in notepad++.
You are right, you need to clear the history on the browser but I did not know how to do this.

You have to reopen the browser(or refresh after you clear the history) and then the links are red(not yet visited)and after you visit the links they are green. When you hover over the link it is pink, when the link is active/selected it is blue.

This is pretty interesting subject!

I had a couple of students who had trouble with a HTML/JavaScript class and they came to me and I tried to help them. I must say, I was not very much help.

Hopefully after I complete this Intro to HTML book I have, I can help out more.

I actually teach business calculus. I actually hated programming while going to school myself I like math more.  

Thanks,

Bill
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad that we sorted this out!
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic