I have a "button" that I want to use on my entire site, but depending on where the button
on the site, I want it to display in different sizes.
In my HTML, I tried (but didn't work):
<div class="button" width="60" height="100">This is a button</div>
And the corresponding CSS:
.button { background-color: #000000; color: #FFFFFF; float: right; padding: 10px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; }
I suggested that if every time I call it class
, I can just pass the size and hey-presto! .... but not ....
Adding width and height, as I call the button
class
, seems to do nothing with its size. Does anyone know how I can do this? And if I put the width and height in CSS
, then the button
will have the same size everywhere.
source share