Log in

View Full Version : placing HTML code in css.



Steve Sea
02-04-2008, 09:03 PM
I have a small bit of coding (about 4 small lines of html) which I use on every page,
is it possible to add this in the css file and call on it with an ID/class
as and when I need to,

Here is the code if it helps

cheers

Steve



<ul>
<li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>

</ul>

thetestingsite
02-04-2008, 09:12 PM
You can't place HTML code in a stylesheet to be referenced later on. Your best bet would be to either use javascript or a server side language (server side is the best, but javascript should suffice as long as the end user does not turn javascript off in their browser).

Hope this helps.