July 14, 200917 yr 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
July 14, 200917 yr 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.
July 14, 200917 yr 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.
July 14, 200917 yr 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.
July 14, 200917 yr 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