Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

a:active problems.. weird...

Featured Replies

I have a few nav links so I added a class:

 

a.nav {
padding-right:10px;
vertical-align:middle;
}

 

then I made a pseudo-class active for when the link is clicked.

 

a.nav:active {
color:red;
}

 

But it's not working.

 

 

I'm having a mind blank-out and can't seem to think of whats causing the problem...

 

In other words, can someone help me figure this out?

 

 

Thank you very much.

  • Author

Sure:

 

<a href="index.htm" title="Home Page" class="navLink">Home Page</a>

In your css, you're using .nav but in your html you're using class="navLink".

  • Author

Oops. Posted the wrong code.

 

Sorry, here is the correct code:

 

<a href="index.htm" class="nav">Home</a>

hehe well spotted ElanMan :D

 

EDIT:

 

So still not sovled ! hmm ...

you might find it easier to put your nav inside a container and give that container an id instead of a class for each individual link... so <div id="nav">your links</div> and the css would go #nav a:hover {color:red;} ... hope that helps.

  • Author
you might find it easier to put your nav inside a container and give that container an id instead of a class for each individual link... so <div id="nav">your links</div> and the css would go #nav a:hover {color:red;} ... hope that helps.

 

Ok, thanks I'll do that.

 

I was having a bad day when I coded that I guess... lol :unknw:

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.