PDA

View Full Version : Web Site Buttons


steveharrison84
June 30th, 2001, 01:20 PM
i would like to put my newly made buttons onto a web site i no i place them in the index.htm page but where ,and do i create a folder for the buttons to go into or can they go where the index.htm file is??
steve

Steven.Bentley
June 30th, 2001, 06:15 PM
Hi Steve

The directory structure is entirely up to you, an images directory is often seen as better for larger sites, if it's just one page the same directory is generally fine.

The basic HTML for an image is

<img src="filename.gif" width=x height=y alt="text description of the image">

the filename is relative to the location of the html page, so if it's in the same directory just use filename.gif, if it's in a subdirectory called images then it's images/fileame.gif.

x and y are the height and width in pixels of the picture and the text description is for old browsers, people with images turned off and for blind/partially sighted people using text-to-speech software. Also handy for search engines.

This code goes in the body section, position it where you want it in relation to the text.

steveharrison84
June 30th, 2001, 06:34 PM
steve hiya :)
i have no idea where the body on the index.htm is ,is that just the bottom of the page,also what determins the button posistion say a button on the left of the page??

[ 30 June 2001: Message edited by: steveharrison84 ]

Steven.Bentley
June 30th, 2001, 08:43 PM
An HTML page has two sections, a head and a body.

This is the basic structure of an HTML page.

<html>
<head>
<title>
<!-- what you want the title bar to say -->
</title>
</head>
<body>
</body>
</html>

The content of the page is put between the <body> and </body>

The positioning is generally done with tables, so if you're putting your buttons down the left hand side of the screen for example

<html>
<head>
<title>
</title>
</head>
<body>
<table>
<tr>
<td width="300">
<!-- image tags here for the buttons -->
</td>
</tr>
<tr>
<td>
<!-- rest of the page here -->
</td>
</tr>
</table>
</body>
</html>

Now re-reading your post, I think the code you actually want for the buttons is the code to make them link to another page.

<a href="pagetolinkto.htm"><img src="filename.gif" width=x height=y alt="text description" border=0></a>

You can move onto a new line using <br> between these lines. Carriage returns are ignored in the HTML source.

<!-- this is an HTML comment btw -->

steveharrison84
July 1st, 2001, 05:50 PM
thanks steve ive copied that into notepad for future reference..
steve

Steven.Bentley
July 1st, 2001, 08:33 PM
No problem Steve :)