I have a trouble in web fixed page header and in-page anchors. First I see this post: "HTML position:fixed page header and in-page anchors" , then I type the code below:
HTML:
<a href="category.html#phone">PHONE</a>
<div class="subject2">PHONE</div>
<a name="phone" class="anchor"></a>
CSS:
.anchor{
position:relative;
top:-166px;
}
This works on Chrome and Firefox in office computer, but the strange thing happen when I see on my own computer: the anchor shows top:0 instead of top:-166, just like IE!
What's wrong when it show different in same browser? What did I miss?
Thank you! :)