Makzan / I share what I learnt

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 January 15, 2016. More articles like this: Accessibility, CSS.

Sign up for weekly dispatch each week.

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

Read previous weekly dispatch newsletters.