Image

Imagefunvill wrote in Imagewebdev

(CSS) weird style question

hello
I got a weird question about CSS
 
I want to take this class and put it in to one <span>
Instead of this
---------------
<style type="text/css">
.up {  margin: 3px; font-family:arial,sans-serif; font-size: 9px; font-weight:bold; 
background-color:#d8e3e6; border: 1px solid #cccccc;}
.up a, .up a:link, .up a:visited { text-decoration:none;  }
.up a:hover, .up a:active { background-color:#e4e6d8; border: solid 1px #999999;
}
</style>
<span class="up">something </span>
--------------
I want this
--------------
<span style=" style stuff ">something </span>
--------------
 
so why in gods name would i want this ?
well i made this little program that reads data off my control-server (thing that controls my house light, heating and stuff) and makes WebPages from the data. On that webpage you can set and get values turn stuff on and off and so on
unforcanly i can't edit the head section of my pages and only some pages will need this style, i also change the value based on the data that is sever... if the heats at 0 c then the back ground color is going to be blue. if its 40 c its going to be red and so on
I know that you can you can just put the style section above the line but then it will effect all tags with class= 'up" i would much vather use it only where i need it
i know this is also a big waste of bandwidth but these pages will be served from a lan so i'm not to worried about bandwidth


i guess what i'm asking is can i set a:link and a:hover inside the style tag
thank you for your help