PDA

View Full Version : Another button question......


Beaux
01-15-2003, 06:39 PM
Ok, I've been playing around with alot of different codes, mostly the ones that I got from here today, trying to work on some buttons. Since I'm totally new to HTML, I'm learning alot.(the hard way) I was playing around the <button> tag and there is one thing that has me stumped. How in the world can I make the button link to a specific site? I tried all the things I thought would link it but nothing did. What needs to be added to the code below to link it to..........www.whateverlink.com? I know this probably isn't the best way to create buttons but now it's just the principle of figuring it out.lol Thanks

<button><strong><font face="verdana" size="5">Gallery 1</font></strong>
</button>

cbkihong
01-15-2003, 07:18 PM
This gives you a basic button that does what you want:

<input type="button" value="Click Me" onclick="window.location='http://www.google.com';">

Beaux
01-15-2003, 07:29 PM
That still doesn't give me the control over the font, font size etc. Can those options easily be added to the code you just gave me?

ByteWizard
01-16-2003, 06:05 AM
Something like this...


<html>
<head>
<title>Untitled</title>
<style>
div.button {
display: block;
width: 100px;
height: 35px;
background-color: #999999;
border-style: outset;
text-align: center;
text-decoration: none;
color: black;
font: 18px arial, verdana, sans-serif;
padding: 2px 0px;
{
</style>
</head>

<body>
<div class="button">
<a href="http://www.nowhere.com"> Gallery 1</a>
</div>
</body>
</html>