/    Sign up×
Community /Pin to ProfileBookmark

How to make display none in correct way?

I have working display none as following:

[code=html]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>

<head>
<title></title>
<style type=”text/css”>
/*<![CDATA[*/
#skip {display:none}
/*]]>*/
</style>
</head>

<body>
<table>
<tr>
<td></td>
<td>
ypi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

</td>
<td><div id=”skip”><img src=”ads.jpg” width=”209″ height=”262″ alt=”” /></div></td>
</tr>
</table>
</body>
</html>

[/code]

I have question why is also used option to use negative positioning rather than display none like [B]absolute; left:-999em; [/B]
Which position will place this on website as print page probably will detect such image…

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@KDLAJan 21.2009 — I believe the negative positioning is ideal for screen readers or other accessibility tools.
Copy linkTweet thisAlerts:
@CharlesJan 21.2009 — I believe the negative positioning is ideal for screen readers or other accessibility tools.[/QUOTE]It's just a goofy way of doing things. Better to just say what you mean. If you don't want something to be displayed then set the display to none.

Unless you haven't excluded the style from aural browsers and you want to hide the text only on screens then you would use the positioning. Where this comes into play is with the "skip to content" link. Using an audio or Braille browser you [i]really[/i] don't want to have to hear the same list of menu options for each and every page on a web site. So it's polite to provide at the very top of the page a link to the non-static content. It's not needed on graphical browsers so one typically hides it by setting the display to none in the screen stylesheet. But if your stylesheet is doing double duty, screen and aurao, then you need that little trick. Best to set the media correctly.
Copy linkTweet thisAlerts:
@felgallJan 22.2009 — Using a negative offset to place something off the screen is used where you don't want something to dosplay on the page but you do want screen readers to be able to access the information.

If you use display:none then no one can see/hear it.
Copy linkTweet thisAlerts:
@toplisekauthorJan 22.2009 — I have checked this definition:

[I]A screen reader is a software application that attempts to identify and interpret what is being displayed on the screen (or, more accurately, sent to standard output, whether a video monitor is present or not). [/I]

Where to find more [B]about conversion to [/B] or there is software?

1. re-presented to the user with text-to-speech

2. sound icons, or a

3. Braille output device
×

Success!

Help @toplisek spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...