Kayote
Kayote

Reputation: 15627

CSS - selectors accessibility

All,

I cannot for the life of me figure out what is wrong with this simple code. Its fairly basic CSS but the browser (FF) totally ignores the last CSS selection code.

Here is the html:

<div id="cat_box01"> 
    <a href="#"><img src="i/cat/cat_img01.jpg" /></a>
    <class="sizes_txt">Sizes:</class> 
</div>

And here is the CSS:

#cat_box01 {
    background: rgba(255,43,43,1); /* colouring the background as a test */
    height: 250px;
    width: 500px; 
    padding: 10px;
    border: 0;
    margin: 0px;
    position: absolute;
    top: 98px;
    left: 16px;
    z-index: 1;
}


#cat_box01 a img {
    height: 200px;
    width: auto;
    position: relative;
    left: 5px;
    padding: 5px;
    border: 0;
    margin: 0;
    opacity: 0.9;
}


#cat_box01 .sizes_txt {
    position: relative;
    left: 300px;
    padding: 0;
    border: 0;
    margin: 0;
    font-family: Helvetica, Georgia, Arial, sans-serif;
    font-size: 10px;    
}

Its the #cat_box01 .sizes_txt syntax that is not run. What is it that I am doing wrong here? Cheers for helping a newbie :)

Upvotes: 0

Views: 161

Answers (1)

jondavidjohn
jondavidjohn

Reputation: 62392

<class> is not a valid dom element

use <span class="sizes_txt"> </span> instead

Upvotes: 2

Related Questions