Img Id's

I’m having a problem with using an id attribute on an img tag. This is the img tag:

<img src=“images/25off.jpg” width=“159” height=“174” alt=“coupon” id=“25off”/>

And this is the CSS rule:

float: right;

So why doesn’t this work? Seems simple enough.

-confused and curious :confused:


You can’t start an ID with a number as it’s invalid and won’t be recognised.

Change it to:

    float: right;

Duh! Should have tested for that first. Thanks for the help.