Click to See Complete Forum and Search --> : Uniform Sized Link Buttons?
radman3120
10-28-2005, 11:20 PM
Hello. For the only ways I know of making link buttons, the button width varies by the the amount of text entered. Is there any way that I can make a uniform width button and possibly even a two line (height-wise) buton? Thanks
Kravvitz
10-29-2005, 12:15 AM
This won't work in IE6.
input[type=button],input[type=submit],input[type=reset] {
padding: .5em;
min-width: 5em;
}
NogDog
10-29-2005, 01:44 AM
Here's an example of how to make link "buttons" using CSS and an unordered list:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
<title>links</title>
<style type="text/css">
#nav {
float: left;
background-color: aqua;
border: solid 2px navy;
padding: 4px 8px;
list-style: none;
}
#nav li {
margin: 4px 0;
padding: 0;
}
#nav a {
display: block;
width: 8em;
padding: 0.5em;
margin: 0;
border: outset 2px blue;
text-align: center;
text-decoration: none;
color: navy;
}
#nav a:hover {
border-style: inset;
}
</style>
</head>
<body>
<ul id="nav">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link Two</a></li>
<li><a href="#">Link #3</a></li>
</ul>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>button</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
button {
width:5em;
}
</style>
</head>
<body>
<button type="button">button</button>
<button type="button">double<br>height</button>
</body>
</html>
radman3120
10-29-2005, 03:29 PM
Thanks a lot! :)