Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
hiding

10 Articles
{
,

}
Direct link to the article Comparing Various Ways to Hide Things in CSS
accessibility hiding

Comparing Various Ways to Hide Things in CSS

You would think that hiding content with CSS is a straightforward and solved problem, but there are multiple solutions, each one being unique.

Developers most commonly use display: none to hide the content on the page. Unfortunately, this way of …

Marko Ilic on Oct 27, 2020 Updated on Nov 3, 2020
Direct link to the article The `hidden` Attribute is Visibly Weak
display hidden hiding

The `hidden` Attribute is Visibly Weak

There is an HTML attribute that does exactly what you think it should do:

<div>I'm visible</div>
<div hidden>I'm hidden</div>

It even has great browser support. Is it useful? Uhm. Maybe. Not really. …

Chris Coyier on Oct 16, 2019
Direct link to the article Inclusively Hidden
accessibility hiding inert visibility

Inclusively Hidden

Scott O’Hara recently published “Inclusively Hidden,” a nice walkthrough of the different ways to hide things on the web. Nothing is ever cut and dry when it comes to the web! What complicates this is that hidden begs the question: …

Chris Coyier on Apr 19, 2019 Updated on Feb 23, 2021
Direct link to the article See No Evil: Hidden Content and Accessibility
accessibility hiding

See No Evil: Hidden Content and Accessibility

There is no one true way to hide something on the web. Nor should there be, because hiding is too vague. Are you hiding visually or temporarily (like a user menu), but the content should still be accessible? Are you …

Chris Coyier on Mar 15, 2019
Direct link to the article Beware Smushed Off-Screen Accessible Text
accessibility hiding

Beware Smushed Off-Screen Accessible Text

J. Renée Beach:

Over a few sessions, Matt mentioned that the string of text “Show more reactions” was being smushed together and read as “Showmorereactions”.

Turns out a popular technique for hiding content visually (but not hiding it for assistive …

Chris Coyier on Oct 14, 2016 Updated on Oct 18, 2016
Direct link to the article #142: Hiding Things With CSS
hiding

#142: Hiding Things With CSS

There isn’t just a single CSS property that you reach for when hiding and showing things in CSS. There are a bunch of considerations that we’ll go over in this video.

For instance, there is the display property in which …

Chris Coyier on Oct 16, 2015 Updated on Feb 22, 2021
Direct link to the article Toggle Visibility When Hiding Elements
hiding visibility

Toggle Visibility When Hiding Elements

The development team at Medium have discussed some bad practices that break accessibility. In one example, they argue that opacity is not well supported by screen readers and so if we want to hide an element in a transition …

Robin Rendle on Sep 17, 2015 Updated on Feb 22, 2021
Direct link to the article Places it’s tempting to use `display: none;`, but don’t
accessibility hiding

Places it’s tempting to use `display: none;`, but don’t

Help yourself be better at accessibility by using better hiding techniques that don't use display: none;. This involves some tricks like using more clever class names, being fancier with how you deal with JavaScript library animations, or avoiding hiding all together.
Chris Coyier on Feb 27, 2012 Updated on Sep 13, 2019
Direct link to the article visibility
hiding visibility

visibility

The visibility property in CSS has two different functions. It hides rows and columns of a table, and it also hides an element without changing the layout.

p {
  visibility: hidden;
}
tr {
  visibility: collapse;
}

visibility has …

Sara Cope on Sep 6, 2011 Updated on Jan 27, 2025
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top