Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

-999em?

Featured Replies

h1 {
 background: url(images/lwd.png) top left no-repeat;
 width: 490px;
 height: 139px;
 text-indent: -999em;
 font-size: 11px;
 margin-bottom: 2em;
 }

 

I don't understand the

text-indent: -999em;

part, could anyone please explain for me?

 

You can see the actual web page here:

link

 

The whole css file is attached below.

lwd.css

It's so the text doesn't appear over the top of the image, it's telling the text to appear off screen (so it's not visible).

 

If css is disabled, the background image won't be present, but the text will be their instead.

 

It's a very commonly used technique when replacing text content with images.

  • Author

It's so the text doesn't appear over the top of the image, it's telling the text to appear off screen (so it's not visible).

 

If css is disabled, the background image won't be present, but the text will be their instead.

 

It's a very commonly used technique when replacing text content with images.

 

The funny thing is that even if the background line were deleted, the background image would still be there, and change of the file name in the css file would have no effect in the presentation of the page. That bewilders me.

The funny thing is that even if the background line were deleted, the background image would still be there, and change of the file name in the css file would have no effect in the presentation of the page. That bewilders me.

 

Huh? if you remove the background line, the background image will disappears, and the header will still be off the screen.

 

If you change the name of the css file without changing the reference in the page, the aesthetics will break.

It's also an accessibility issue for blind people.

 

The code has a background-image which can be seen and text which cannot be seen by sighted people because it's 999em out to the left.

 

The blind person can't see the image, but the screen reader will read the text because text is in the markup (the -999em doesn't have any effect on the screen reader).

 

It's also a reason why menu buttons which are just a background-image or a normal image without text are impossible for blind people, they need text for the screen reader to tell them what the link is.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.