i am working on a website for my course, i am doing web design, i can%26#039;t get any anchor links to work tho, on my page if a complaints, location, index, staff and all that jazz, i am working on the staff and the tutor has set us a task of creating anchor links on the staff page, she wants the anchor links to go from each of the names on the top row to the names on the first line of each paragher about the staff, how do i do this, the rest of site is finished, apart from the links i have to make from the index to the original 3 files and from each of the original 3 files, which are the complaints, location and staff, back to the index, i want the website finished, cos there is no class tomorrow, cos it%26#039;s half term, i want to impress the tutor, that%26#039;s why i wanna complete it oh and i have to put a description of myself on the staff page as well, cos i am the general manager of a fruit and veg firm, any tips or useful info on the anchor, how do anchor links actually work
Web design question, anyone know the correct method for doing this?
You should have a read of %26#039;The Anchor Tag and the Name Attribute%26#039; on http://www.w3schools.com/html/html_links... This tells you how to make named links which can then be used as targets for anchor tags.
Added...
Try and make all of your tags properly formed. So use something like
%26lt;a name=%26quot;fred%26quot; /%26gt;
at the point where you are defining Freds details.
Then use
%26lt;a href=%26quot;#fred%26quot;%26gt;Freds Details%26lt;/a%26gt;
when you want to link to their details.
Nige
Web design question, anyone know the correct method for doing this?
Like this:
%26lt;a href=%26quot;#anchorResults%26quot;%26gt;Results Paragraph %26lt;/a%26gt;
Later or before
%26lt;a name=%26quot;anchorResults%26quot;%26gt;%26lt;/a%26gt;
%26lt;h2%26gt;Results%26lt;/h2%26gt;
Other Replys:Because you say that it should be a LIST of staff members:
%26lt;ul title=%26quot;Staff Members%26quot;%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#russell%26quot;%26gt;Russell%26lt;/a%26gt;%26lt;/li%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#henry%26quot;%26gt;Henry%26lt;/a%26gt;%26lt;/li%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#fred%26gt;Fred%26lt;/a%26gt;%26lt;/li%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#jean%26gt;Jean%26lt;/a%26gt;%26lt;/li%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#sally%26gt;Sally%26lt;/a%26gt;%26lt;/li%26gt;
鑱借伣%26lt;li%26gt;%26lt;a href=%26quot;#julie%26quot;%26gt;Julie%26lt;/a%26gt;%26lt;/li%26gt;
%26lt;/ul%26gt;
...I%26#039;ve set your elements as list items (li) in an unordered list (ul). It can also be an ordered list (ol), but that will produce numbers instead of bullets and that may denote some sort of ranking.
Now, in order for these things to work, there should be items in the same page that have ID%26#039;s that correspond to the %26quot;href%26quot; values of your links, like:
%26lt;p id=%26quot;russell%26quot;%26gt;This is the paragraph about Russell.%26lt;/p%26gt;
%26lt;p id=%26quot;henry%26quot;%26gt;This is the paragraph about Henry.%26lt;/p%26gt;
Having a href=%26quot;#russell%26quot; means that the anchor (a) links to an element within a page that is identified by the string following #. So, basically, you can think of id=%26quot;something%26quot; being the partner of href=%26quot;#something%26quot;.
If you have an anchor with href=%26quot;#something%26quot; and no element in the page has id=%26quot;something%26quot;, it won%26#039;t work.
Other Replys:simple
find the anchor symbol and click and name this where you want an anchor
always wise to put an anchor at top of page and call it top
No comments:
Post a Comment