[thelist] Dumb CSS question

Lee Kowalkowski lee.kowalkowski at googlemail.com
Mon Dec 3 15:36:51 CST 2007


On 03/12/2007, Charles <lists07 at wiltgen.net> wrote:
> Hello,
>
>         .entry-content a {
>                 border-bottom:solid 1px #66FFFF;
>                 }
>
>         .entry-content a img {
>                 border-bottom:none 0px !important;
>         }
>
> Since the second rule is more specific, I /know/ (but I must be wrong) that
> it should override the rule above.  However, my images all still have a
> #66FFFF line under them.
>
> Help?

Hi Charles,

Your first selector selects the A element and applies a bottom border.
 Your second selector selects the IMG element and does very little
(well, unless you still have the default border given to IMG elements
that are descendants of A elements, in which case it removes its
bottom border).

Unfortunately, the last subject in the selector is the element which
gets styled.  Therefore, you'll have to do something like the
following to make your selector more specific:

.entry-content a.icon {
  border-bottom:none;
}

Does that make sense?

-- 
Lee



More information about the thelist mailing list