> Hi there,
>
> I'm currently trying to control an <a> html tag with a class ID ,,1" , but I
> just can't change the settings of it.
>
> The html looks like this:
>
> <div id="navigation">
> <ul>
> <li class="selected"><a href="#"><img class="whitebg"
> src="nav/white_stripe_bg.gif">Staude des Jahres</a></li>
> <li><a class="1" href="#"><img class="whitebg"
> src="nav/white_stripe_bg.gif">Staudenportraits</a></li>
> <li><a class="2" href="#"><img class="whitebg"
> src="nav/white_stripe_bg.gif">Staudenportraits</a></li>
> <li><a class="3" href="#"><img class="whitebg"
> src="nav/white_stripe_bg.gif">Staudenportraits</a></li>
> </ul>
> </div>
>
> In CSS I'm trying things like:
>
> #navigation a.1:hover img { height: 2px; }
>
> Or even:
> #navigation ul li a.1:hover img {height: 2px; }
>
> but it's not working.
> If I control the element with:
> #navigation a:hover img {...}
> everything just works fine, but I only want to control the specific
> elements, not all <a> tags.
Try using an alphanumeric character first, like "nav1". While the
specs seem not to forbid class names that are only numbers
http://www.w3.org/TR/html4/types.html#type-cdata
(it is a different issue for IDs!) I doubt browsers really understand
what is going on. So would the maintainers of your code. Use class
wisely and with semantics in mind, not driven by the visual
representation. Furthermore class should be used when there is more
than one element that should get the same style. Maybe if you describe
what you want to achieve we can help you better, I get the impression
you are doing things overly complex.
--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/