Crack Interview With Tricky CSS Questions in 2021

  1. Remove white space between two inline-block elements?
Trick 1
Trick 2 inline-block
.menu{
z-index:1000000000000000
}
SASS z-index
$zMain:45
Accessibility
  • Keyboard navigation
  • Text alternative for image/icon (Alt tag)
  • Sufficient contrast
  • Size of the element and space between element
  • Readable font sizes
Syntax
CSS specificity
.el.el{
color:blue;
font-size:14px
}
[id=”myId”]{
color:green
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store