Click here to get back home

html anchor tag displayed in middle not top

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
html anchor tag displayed in middle not top teranetsecurity 10-11-2005
Posted by teranetsecurity on October 11, 2005, 8:30 am
Please log in for more thread options


I have a question. I'm working on this website with a treeview style
menu coded in php. the menu autocreates itself by pulling data off a
mysql database. It has the capabilities to get quite large though and
when the page refreshes I want the menu to display at the same place.
But The problem is in the anchor tag im putting in there <a
name='$name'><a href=$php_self?var=$var&var2=$var2#$name>$name</a> when
the link is clicked that point in the menu displays at the top which
does not look good for a small menu. Any help on this would be great.
Is there a way to have it display 10 lines of test/200px/ any space
between the top of the page and the <a name> anchor. Thanks


Posted by Thomas Mlynarczyk on October 11, 2005, 10:13 pm
Please log in for more thread options


Also sprach teranetsecurity@gmail.com:

> But The problem is in the anchor tag im putting in there
> <a name='$name'><a href=$php_self?var=$var&var2=$var2#$name>$name</a>

So, basically, that is more or less the same as
<a name="$name"></a><a href="#$name">Blah</a>
(Your code is missing a closing </a> tag!)

> when the link is clicked that point in the menu displays at the top

Well - what else do you expect from this code? You define a named anchor and
on the same line a link to that very anchor.

> which does not look good for a small menu.

You said the menu had the capability of growing quite large. So a "small"
menu would be more or less an exception, in which case that behaviour could
simply be tolerated. Anyway, as you are generating it with PHP you can
easily check its size and simply drop the named anchor if the menu is not
large enough.



Similar ThreadsPosted
HTML is not displayed but downloaded ! Please help ! August 19, 2004, 2:16 am
[Q] Using the POST Method with HTML Anchor Tags March 23, 2005, 2:52 pm
HTML Link to an Anchor - eBay Listing Template June 30, 2005, 9:43 pm
Target frame link anchor in new parent html file December 13, 2004, 3:47 am
Why is
  • badly displayed ?
  • July 25, 2004, 4:33 pm
    Frames Not Displayed September 24, 2005, 1:07 pm
    RE: Frames Not Displayed September 26, 2005, 4:19 am
    Stretch DIV Tag From Middle? March 22, 2005, 2:34 pm
    iFrame in middle of page April 12, 2005, 6:02 am
    valign='middle' not working in IE? February 10, 2008, 7:35 pm

    Our other projects:

    Art Dolls, Fairies and Mermaids - Sunnyfaces.net

    Roy's Linux, Programming and Search Engines messages

    1-Script XML SitemapXML Sitemap