Click to See Complete Forum and Search --> : [RESOLVED] newbie issue, span style vs. class


chazzy
04-20-2009, 02:10 PM
I have a span defined like this:


<span style="background-image:url('right.png');background-repeat:no-repeat;padding:2px 2px 2px 2px;"></span>


And it displays perfectly.

When I change it to have a stylesheet define as:


.rightTab { background-image:url('right.png');background-repeat:no-repeat;padding:2px 2px 2px 2px; }

and the span defined as:

<span class="rightTab"></span>

The style is lost. No other tags/styles are in place. What gives?

6StringGeek
04-20-2009, 04:23 PM
div class="rightTab"

chazzy
04-20-2009, 09:25 PM
well, as i mentioned, it works fine when i put the style attribute in, instead of a class, so switching to a div is unlikely to fix it.

i was however mistaken, i missed an error in the previous stylesheet (no } ) so it wasn't rendering properly. it's working now.