Sent by Jens Brueckmann on 25 January 2005 20:08
On Tue, 25 Jan 2005 12:38:43 -0500, George Smyth [EMAIL-REMOVED]>
wrote:
> I normally stay away from anything that is browser-specific, but one
> exception has been the ability to magnify the page, which has shown
> itself to be useful to some of our low-vision users. This uses the zoom
> property only available in IE (hopefully others will embrace this).
When zooming pages in Opera, every element - images included - is resized.
> I have this option at the bottom of the main navigation, which is listed
> within <ul> tags (the code can be seen at http://usna.com). Because I
> do not want to offer this to browsers that cannot utilize it, I am using
> JavaScript to detect the browser - if it is IE then JavaScript displays
> the option.
>
> The validator is properly (I am sure) telling me that my JavaScript code
> should not be within the <ul> tags, but I do not know of another way of
> doing this.
as you would like the list element only to be displayed in Internet
Explorer it would be best, if you wrapped the HTML inside conditional
comments instead of using navigator.appName for browser detection (which
is, by the way, the worst method for browser detection) and
document.write() :
<!--[if IE]>
<li>
content
</li>
<![endif]-->
Though being off-topic I would also like to draw your attention to the
fact, that document.write() would not work for proper XHTML documents
served as application/xhtml+xml. You should use DOM methods instead. And
last not least any event-handler should be in lowercase when using XHTML.
Hope this helps.
Cheers,
jens
--
Jens Brueckmann
http://www.j-a-b.net/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/