In the following html page, I'm using a stylesheet to move
everything in the body over five percent, and then move the
h1 heading back over to the left margin. On IE 6 (W2K & 98)
the relative link (fragment identifier) only works if the
heading text is wider than five percent of the window size.
(In other words, change the lowercase letter "l" used below
into something longer -- or make the window sufficiently
narrow -- and it'll start working.)
Is this a known bug? Is there a workaround? (I'm just
trying to do basic indentation -- to have the headings at
the left margin, and have other stuff indented. My current
workaround is just to settle for an indentation narrow
enough that all my headings are wider than that
indentation.)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=us-ascii" />
<title>Test</title>
<style type="text/css">
<!--
body {
margin-left: 5%;
}
h1{ margin-left: -5%; }
-->
</style>
</head>
<body>
<p>
<a href="#linky">Click me</a>
<!-- These breaks are just to put some vertical whitespace
in the page. -->
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</p>
<h1><a id="linky">l</a></h1>
</body>
</html>
Thanks,
--
Aaron Brown
arundelo @ hotmail.com