Is it possible to style a variable ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jbartlett11
    New Member
    • May 2014
    • 1

    Is it possible to style a variable ?

    I have a variable in my code called BLACKCARDS which is a string. I'm trying to style it using CSS not inline style. I've tried below but this is not working.

    Code:
    <style type="text/css">
    		BLACKCARDS
    		{
    			background-color:orange;
    		}
    	</style>
    How do I style this variable?
    Last edited by Rabbit; May 5 '14, 12:14 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Please use tags when posting code or formatted data.

    You will have to explain what you mean by variable. HTML and CSS has no variables. So you are either talking about a client side scripting language such as JavaScript or server side scripting language such as PHP. In either case, variables themselves are not displayed unless you tell them to be displayed. And if you are telling them where to be displayed, then you can also tell them to be displayed within a span or div that you can style.

    Comment

    Working...