473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Why does named anchor fail?

The link looks like this:

http://www.postpositive.net/library.php#cat6

The target looks like this:

<a name="cat6">cat6</a>

The link resides on this page:

http://www.postpositive.net/wp02/?cat=7

The FIRST time the link is clicked, you end up at the WRONG POSITION on the
page; SUBSEQUENT clicks will take you to the CORRECT POSITION (you can also
get to the correct position if you hit refresh after arriving on the new
page the first visit).

Browser cache needs to be cleared to repeat the error after the first visit.

I've tried adding 800px of margin-bottom and/or padding-bottom, and also
using transparent spacers on the bottom of the page, but no luck...

Is there some CSS trick to work around this problem?

The problem exists in both IE and FF

Other suggestions?
Aug 9 '06 #1
6 2149
Deciding to do something for the good of humanity, jim039845
<ji*******@hotmail.comdeclared in comp.infosystems.www.authoring.html:
The FIRST time the link is clicked, you end up at the WRONG POSITION on the
page; SUBSEQUENT clicks will take you to the CORRECT POSITION (you can also
get to the correct position if you hit refresh after arriving on the new
page the first visit).
Adding the relevant dimensions of the images in the HTML would certainly
help - the problem is that the browser jumps to that point on the page
once the page itself loads, but then when the images load the page is
rearranged because it doesn't know in advance how much space to reserve
for the images.

IIRC there was a discussion about this only recently - I think it was
over in alt.html.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
Aug 9 '06 #2
Adding the relevant dimensions of the images in the HTML would certainly
help - the problem is that the browser jumps to that point on the page
once the page itself loads, but then when the images load the page is
rearranged because it doesn't know in advance how much space to reserve
for the images.
Yes!! That was it!! Problem solved!!

The solution was to add dimensions for every image on the page - even spacer
images - like so: <img
src="http://www.postpositive.net/images/spacer-horizontal-10px.gif"
width="1" height="10" alt="">

Also, making sure the page validates against the W3C HTML validator is a
good idea....
IIRC there was a discussion about this only recently - I think it was
over in alt.html.
I guess misery loves company.

As far as I know, width and height dimensions are supposed to be "optional"
(according to the W3C spec). So much for optional...
Aug 9 '06 #3
jim039845 wrote:
As far as I know, width and height dimensions are supposed to be "optional"
(according to the W3C spec). So much for optional...
Just because something's optional doesn't mean it doesn't make a difference!
Aug 9 '06 #4
Rik
jim039845 wrote:
>Adding the relevant dimensions of the images in the HTML would
certainly help - the problem is that the browser jumps to that point
on the page once the page itself loads, but then when the images
load the page is rearranged because it doesn't know in advance how
much space to reserve for the images.

Yes!! That was it!! Problem solved!!

The solution was to add dimensions for every image on the page - even
spacer images - like so: <img
src="http://www.postpositive.net/images/spacer-horizontal-10px.gif"
width="1" height="10" alt="">

Also, making sure the page validates against the W3C HTML validator
is a good idea....
>IIRC there was a discussion about this only recently - I think it was
over in alt.html.

I guess misery loves company.

As far as I know, width and height dimensions are supposed to be
"optional" (according to the W3C spec). So much for optional...
Yup, but it's exactly their reason for existing. Not to resize images, for
which it's often abused, but to give the browser a hint how large the image
is before loading, so the page isn't rearranged on an image load. Not always
necessary, so optional, but in this case very welcome :-).

Grtz,
--
Rik Wasmus
Aug 9 '06 #5
Gazing into my crystal ball I observed "jim039845"
<ji*******@hotmail.comwriting in
news:ZL******************************@comcast.com:
>
The solution was to add dimensions for every image on the page - even
spacer images - like so: <img
src="http://www.postpositive.net/images/spacer-horizontal-10px.gif"
width="1" height="10" alt="">

You really shouldn't be using spacer images. There are much more cleaner
methods. Use tables for tabular data only, and position elements with
CSS, not tables and spacer images. You will be happier as a developer,
search engine bots will have less to sift through, and your visitors will
be happy because there will be less download time with a more accessible
page.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Aug 9 '06 #6
In message <J9******************************@comcast.com>, jim039845
<ji*******@hotmail.comwrites
>http://www.postpositive.net/wp02/?cat=7
Blank, with Javascript unavailable.

img tag not closed:

<img src="http://www.postpositive.org/images/illuminati4.gif"
width="367" height="400" alt="">

You have several links wit the text "Read the rest of this entry", each
to different targets, and no unique, distinguishing title attribute.

--
Andy Mabbett
Say "NO!" to compulsory ID Cards: <http://www.no2id.net/>

Free Our Data: <http://www.freeourdata.org.uk>
Aug 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
HI, I was wondering if it is possible to target a named anchor in a frame when opening a new window with a javascript function? has anyone actualy been able to do this? Thanks in advance for...
4
by: deko | last post by:
I use named anchors to take users to specific parts of a long page. But I want to add some processing and do some things with my nav bar when users go to certain sections delineated by named...
2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
12
by: Frank Hauptlorenz | last post by:
Hello Out there! I have a DB2 V7.2 Database (Fix11) on Win 2000 Professional. It was before a NT 4 based Domain - now it is a Win 2000 Domain. The database server is a domain member. Now...
6
by: Nalaka | last post by:
Hi, Is there a gui control in VS2005 to set a "named anchor"? For an example now I go to the html and write the following code <a name="jumpToThisLocation"/>
6
by: eswanson | last post by:
In jscript, I would like to be able to set the href attribute of the anchor element. I have a aspnet:hyperlink button on the page, but I would like to be able to set the href attribute of this...
12
by: deko | last post by:
I have a long page with several sections and want to link to these sections from another page like this: <a href='http://www.mysite.com/content.html#section12'>Section 12</a> Here's what the...
6
by: Greg Collins [Microsoft MVP] | last post by:
In ASPX, how does one get the named anchor from a URL? Its not in any of the ServerVariables. If a url is: http://www.somerandomsite.com/page.aspx#named_anchor How do I get the value of the...
1
by: Alec MacLean | last post by:
Hi. I'm using VS2005 Pro to work on a website project for my company. The site has several navigation elements, all based on the standard VS2005 navigation components. I have high-level...
8
by: azjudd | last post by:
Thank you in advance for your help on this one. I'm using named anchor tags on a FAQ page with questions listed at the top and answers below; a standard jump-to feature. However, anytime an anchor...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.