Accessibility/SEO Friendly CSS Hiding

1
2
#content {
position: absolute;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Removes an item from the page.

1 Response

Caveat: this can degrade performance on mobile since it creates a massive size "canvas" that the DOM is rendered on thus it eats up memory. Consider the following from the HTML5 Boilerplate project instead.
1
2
/*
* Hide only visually, but have it available for screen readers:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.