When a person is NOT logged in, I want the hyperlinks to be normal, blue, underlined.
When a person is logged in, I want the Username to be bold, orange, underlined so it matches the word "Welcome, "
I seem to have accomplished this, however, if you click on the hyperlink when you are NOT logged in and then drag your cursor off the link - so it doesn’t fire - then the hyperlink turns and stays ORANGE which is annoying…
What is going on?
And is there maybe a better way to do my CSS so things are cleaner and don’t act weird like they are now??
Attached is a Before, During, and After screen-shot…
I am guessing here since you posted only a small snippet of your code. But I think you have a rule somewhere for visited links which is what is turning your links orange a you described.
I think your nested ID selector is overkill. IDs are unique. If the rest of your code is done correctly, you should only need:
The first option is definitely the far better method as it’s clear and concise, people will much more easily recognize that they’ve visited that link before whereas the underline in the second example isn’t obvious enough.
Personally, I never bother with visited styles any more. I don’t like them much, except on sites like Google, where it’s handy to know where you’ve been. You can choose whatever colors you like for visited links, but there’s no guarantee that people will know what that color means—unless perhaps your links are blue by default and turn purple once visited … the usual browser default.