Page is a not externally linkable
DrOliver - 11:28 am on Feb 4, 2004 (gmt 0)
I could not come up with a situation I would want to do this. Interesting… Maybe you could tell what you want to achieve or why. We'll then maybe find another way. I'm with those who say it ain't possible to use CSS only in this case (at least as long as generated content is not widely supported). I am sure you do need some scripting. But then you're hiding this part of your content also from all those who use a non-Javascript-browser or who have Javascript disabled. Well maybe you could use a *cough* table *cough* with a background image, set the size to 1 px so that the table (and its background image) won't be shown (or only 1px tall), give it an id attribute, then override the sizes within your CSS. Ouch. What a hack. I'd use this only if the text is relatively short, so you can give the table a summary-attribute to make the text available to screen readers, for example. What Lynx will do with this I don't know. Does Lynx interpret tables or does it not? If there is absolutely no text within the table but only a background-image is set, then you should be fine. Somewhere in your HTML: This won't validate, though. There might no consistency in behaviours of browsers. Mostly should not show anything, but this is a guessing. In your CSS: I did not test this. Maybe you want to give it a try?
I want to hide content from browsers that do not interpret style sheets like Lynx. <table id="hide" width="1" border="0" cellpadding="0" cellspacing="0" [b]summary="your text goes here"[/b] background="/images/picture-with-your.text.gif">
<tr><td width="1" height="1" background="/images/picture-with-your.text.gif"><td><tr>
<table>table#hide, table#hide td{width:300px;height:400px;} /* The exaxt size of your image with the text in it */