How to place an arrow between two points
If you hover the mouse here
an arrow appears pointing to Image-3 below.
This example works best when the font-size is fixed, and the user does not adjust it. Unfortunately, users cannot be stopped from adjusting font sizes to suit their own needs. For example, the user may need larger fonts to see the text, or to compensate for a very high resolution screen on a small Tablet PC. Changing the font size will change the position of the arrow's endpoints, and will also change the position of Image-3 - the arrow's top endpoint is fixed relative to the word "here", but not fixed relative to the page. In other words - the arrow will move as text is resized.
- Create the arrow to the approximate size and direction in an image editor and save somewhere on the computer. Do not use graphics from the FrontPage Drawing Toolbar or Microsoft Office autoshapes - see VML-graphics for reasons why.
- Import the image into the website.
- Open FrontPage and the website, then open the page.
- Create a layer - Insert->Layer. The layer must not be created within a table cell.
- Move the layer, and resize it, until it fits between the two points of the page where the arrow is to be placed. Bear in mind that if the font size is changed, the arrow's target will move, but the arrow itself will remain fixed in the same position. The arrow will have to be "flexible". Use View->Text Size and change the font size to see what happens in this page.
- Drag the image into the layer from the folder list, and adjust the image size to fit.
- Adjust the layer size to fit the image. Often deleting the height and width is the easiest way.
In this page the layer itself was deleted, but the width, height and position information transferred to the arrows styles -
#arrow {position: absolute; z-index: 1; left: 1em; top: .2em; width: 195px; height: 20em;}
The height and width (20ems and 195px) was found by trial and error, and to an extent allows for browser window and font size changes.
- The HTML, JavaScript and CSS are described on the next pages:
FrontPage/Expression Web Behaviours.
Note that these Behaviours were designed to work with older browsers - up to IE 6 but including Netscape 4 which uses the (now obsolete) <layer> tag. They may work with present day browsers, but some code used is bloated, some is deprecated in today's browsers, and may fail completely in tomorrow's.
- jQuery
Also see the code comparison between the behaviours and jquery methods.