Buttons

J

Jim S

Some time ago someone here gave me a css setup to make moving buttons as
links in my site (code below). It works excellently so thanks to whomever.

I would like to do something similar with a fixed size button eg 100 x 40 px
where the text might flow to 2 lines. The code below makes the button fit
the text and I cannot work out how to modify it.

a.buttonise:link {
border: 2px outset #E8E8E8;
background: #E8E8E8;
color: black;
text-decoration: none;
padding: 2px 0.5em;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: normal;
}
a.buttonise:visited {
border: 2px outset #E8E8E8;
background: #E8E8E8;
color: #800080;
text-decoration: none;
padding: 2px 0.5em;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: normal;
}
a.buttonise:hover, a.buttonise:focus {
border: 2px outset white;
background: white;
font-size: small;
font-weight: normal;
color: red;
}
a.buttonise:active {
border: 2px inset #cfcfc3;
background: #cfcfc3;
font-size: small;
font-weight: normal;
color: black;
}
 
M

Michael

Have you tried adding
width: 100px;
height: 40px;
to the a.buttonise declaration?

Regards

Michael.

PS Note that this is a bad idea. It doesn't behave well under client-side
font size scaling and you will have a problem with long (> 100px) texts.
 
J

Jim S

Have you tried adding
width: 100px;
height: 40px;
to the a.buttonise declaration?

Regards

Michael.

Thanks Michael
Width works, but it appears there is no height property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top