Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- html anchor tag displayed in middle not top
October 11, 2005, 12:30 pm
rate this thread
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
- Thomas Mlynarczyk
October 12, 2005, 2:13 am
Re: html anchor tag displayed in middle not top
Also sprach email@example.com:
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!)
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.
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
- » When did IE stop recognizing entity references without ";"?
- — Next thread in » HTML Authoring Forum