PDA

View Full Version : Buttons with Style Element



vinay016
January 17th, 2008, 08:13 AM
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

burns
January 18th, 2008, 01:32 PM
Doesn't look like it is possible

http://lists.evolt.org/archive/Week-of-Mon-20031020/150285.html

Marz
January 18th, 2008, 02:02 PM
Like the article stated, because Flash is run by an externally plug in and not internally, you can't apply your CSS attributes onto it unfortunately.

Good question though! That one even stumped me for a bit!