BubikolRamios
12-22-2007, 09:07 PM
based on this:
http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
I made modifications that instead of text u can have image inside button. Sample is made so there can be inserted any image 24 x X pixels.
Works in FF ok does not on IE7(only click at right most part of button works)
What is that I dont see ?. Thanks for help.
here is the link to sample:http://86.61.66.17:8084/#
and css:
a.buttonImg {
background: transparent url('bg_button_a.png') no-repeat scroll top right;
display: block;
float: left;
height: 26px;
padding-right: 18px; /*push span to the right for background width*/
outline: none; /* hide dotted outline in Firefox */
}
a.buttonImg span {
background: transparent url('bg_button_span.png') no-repeat scroll top left;
display: block;
height: 26px;
padding-left:18px;/*make space from right background image*/
}
a.buttonImg span img {
height:auto;
width:auto;
border: 0 none;
alt:"žnj";
}
a.buttonImg:active span img {
position:relative;
top:1px;
left:1px;
}
a.buttonImg:active {
background-position: bottom right;
}
a.buttonImg:active span {
background-position: bottom left;
}
http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
I made modifications that instead of text u can have image inside button. Sample is made so there can be inserted any image 24 x X pixels.
Works in FF ok does not on IE7(only click at right most part of button works)
What is that I dont see ?. Thanks for help.
here is the link to sample:http://86.61.66.17:8084/#
and css:
a.buttonImg {
background: transparent url('bg_button_a.png') no-repeat scroll top right;
display: block;
float: left;
height: 26px;
padding-right: 18px; /*push span to the right for background width*/
outline: none; /* hide dotted outline in Firefox */
}
a.buttonImg span {
background: transparent url('bg_button_span.png') no-repeat scroll top left;
display: block;
height: 26px;
padding-left:18px;/*make space from right background image*/
}
a.buttonImg span img {
height:auto;
width:auto;
border: 0 none;
alt:"žnj";
}
a.buttonImg:active span img {
position:relative;
top:1px;
left:1px;
}
a.buttonImg:active {
background-position: bottom right;
}
a.buttonImg:active span {
background-position: bottom left;
}