# Buttons with Style Element

**URL:** <https://forum.kirupa.com/t/buttons-with-style-element/249304>\
**Category:** web dev\
**Created:** [January 17, 2008, 12:13pm UTC](https://forum.kirupa.com/t/buttons-with-style-element/249304 "2008-01-17T12:13:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay016](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vinay016](https://forum.kirupa.com/u/vinay016)\
**Post date:** [January 17, 2008, 12:13pm UTC](https://forum.kirupa.com/t/buttons-with-style-element/249304/1 "2008-01-17T12:13:26Z")

</div>

Hi,

I previously created a rollover button using style tag and it was based on .gif image. Here the source goes:

.rollover a {  
display:block;  
width: 90px;  
padding:10px 10px 10px 7px;  
font: bold 13px sans-serif;;  
color:#333;  
background: url(“button.gif”) 0 0 no-repeat;  
text-decoration: none;  
}  
.rollover a:hover {  
background-position: 0 -35px;  
color: #049;  
}  
.rollover a:active {  
background-position: 0 -70px;  
color:#fff;  
}

and after closing the Style element…

\<div class=“rollover”\>

\<a href="#"\>Home\</a\>  
\<a href="#"\>Galleries\</a\>  
\<a href="#"\>Contact\</a\>  
\<a href="#"\>Others\</a\>  
\</div\>

So it created a rollover button based on only one image. (i.e., button.gif).

Thus, I just want to know if i could use button.swf in place of button.gif. What i mean is, can i use .swf files in place of images in above given style content. Please help i want to create a button with animation when mouse rolls over it.

I know how to create a flash buttons but i want only one flash file loaded for all buttons, then i will change the text and the link of the button which will speed up the website. Please help. Thank You
