473,385 Members | 1,727 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,385 software developers and data experts.

html anchor tag displayed in middle not top

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

Oct 11 '05 #1
1 2332
Also sprach te*************@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.
Oct 11 '05 #2

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

Similar topics

0
by: SteveJ | last post by:
All, Can someone help me solve the next step. First of all let me say I'm new to php. I pieced the following code together from samples I found on the net and a book I bought called PHP...
6
by: Daniele Baroncelli | last post by:
Hi guys, I would like to change the text in an anchor. es. from <a id="idanchor">oldtext</a> to
17
by: Christopher Nelson | last post by:
I have a menu tree made up of anchors inside list items in a multi-level list that includes HTML like: <ul id='xx'> <li><a href='conf.cgi' class='menu' target='main' title='Configure stuff'...
2
by: James | last post by:
I have a forms application which has many controls such as buttons,labels,listviews,text boxes etc. If you set the window size to maximum size so that it would expand to the size of the screen the...
6
by: Richard Brown | last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared to the horrible 'resize' code I had to write in VB6, there is just no end to the wonders of VB.NET..... uh, ok..... BUT......
2
by: Frank Rizzo | last post by:
This maybe a very simple question, but i can't find the answer. I placed a button dead center in the middle of the form. How do I anchor it (or dock it or whatever), so that it always remains in...
8
by: David C. Stone | last post by:
I'm stuck trying to validate an html 4.01 page that uses an image map. I copied the second client-side example from here: <http://www.w3.org/TR/html401/struct/objects.html#h-13.6> and...
3
by: steve_barker333 | last post by:
Hi guys, I'm just in the process of converting a site I'm writing from ASP.NET 1.1 to ASP.NET 2.0. Of course, there are lots of new features that are going to save me a lot of time, but at the...
1
by: Andy Bates | last post by:
Hi - I have a form hosting the above control. I can generate the HTML as a Stream and set it in the control using: this.webBrowser1.DocumentStream = myStreamOfHTML. The problem is that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.