On Mon, 13 Aug 2007, faramineux wrote:

> I do not want the images which are linked to be styled the way the
> text links are.

They aren't. As a rule, none of the default styling of text links is 
applicable to images that are links, though such images have default 
styling of their own. Thus, it is unclear what you want

> The code below is not working, what is wrong? TIA
>
> a:hover {
> color: #2B4058;
> font-size: 13px;
> font-weight: normal;
> background-color: #fffbdf;
> border-bottom-style: dashed;
> border-bottom-width: 1px;
>
>

Something is missing, at least a closing "}", which could cause quite a 
lot. It's generally best to post the URL of a demo page rather than copy 
its code, since quite possibly something goes wrong in the copying 
process, or the problem is affected by other parts of the code.

> a:hover img {
>
> background-color: none;
> text-decoration: none;
> border-style: none;
>
> }

Here you affect the properties of an <img> element in some situations. 
But in the previous rule, you set the properties of an <a> element.

In CSS as currently defined and implemented, you cannot use a selector 
that selects an element depending on what elements it contains (e.g., 
those <a> elements that contain an <img> element).

Thus, you would need something like class="image" for those <a> elements 
that are image links (contain an <img> links) and

    a.image:hover { border: none; }

Depending on the structure of the page, it might be possible to use 
something more convenient. For example, if all the image links are inside
   <div class="imagelinks">...</div>
and that element contains no other links, you could use just

    .imagelinks a:hover { border: none; }

without needing to write class attributes for the <a> elements.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to