Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8801629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:53:02+00:00 2026-06-14T00:53:02+00:00

JSFiddle (The *:focus rule is to illustrate which element is marked as having focus.)

  • 0

JSFiddle (The *:focus rule is to illustrate which element is marked as having focus.)

What I’m wondering is why, when I click a menu item, it gets the focus… but clicking a menu item does not give it focus.

What’s wrong with the CSS to make it behave this way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:53:03+00:00Added an answer on June 14, 2026 at 12:53 am

    focus is generally only for elements that can receive keyboard or other input, so by this heuristic lis don’t qualify. This question has more about it..

    In the specs, CSS doesn’t explicitly define what elements can be in those states, so it’s hard to come up with a set rule for what can and can’t be set to focus.

    What might work for your purposes is active, which you can view here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set the focus on a textarea element when clicking on the
please see the following: http://jsfiddle.net/8sq2w/ Problem: Focus in the item Highlight the text and
jsfiddle with example Click a county name to see it's crest appear. I am
jsfiddle is here: http://jsfiddle.net/M86nA/ code is this: $('div.wrap').click(function(){ var $minY = $('div.imgur-wrap').height(); if ($minY
jsFiddle: http://jsfiddle.net/fThMa/2/ Clicking inside the note / rend text fields and then double clicking
Jsfiddle: http://jsfiddle.net/87YGW/ At present I have to click tab 1 to show content however
Why is the box-shadow on :focus not getting applied in this jsfiddle I have
Need to somehow lose focus on <select> after the <option> has been selected. http://jsfiddle.net/MnAdN/
Setting focus on a form element using JavaScript is usually very straight forward. I
I'm trying to get .focus() to work with a slide-in div, but no matter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.