Makzan / I share what I learned

Styling focus element outline

Just realize that z-index only works on non-static element. May be I knew it before but didn’t really make it a knowledge.

When using tab to focus between links, we can use outline to style the focus outline and make it clearer. But element next to the focused link can block the outline. The key point here is to make the :focus element a non-static position, such as relative.

 


Published on 2016-01-15. More articles like this:
- Accessibility
- CSS

Previous <- Introducing Log.md—A logger for everything flash in your mind
Next -> Is jQuery dead?

Want productive tips and web technologies links like this in your inbox each week? Sign up for weekly dispatch each week. No spam ever. Just useful content: