Results 1 to 3 of 3

Thread: Targetted pseudo-classes

  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Targetted pseudo-classes

    Hi

    Yes I'm new at this so my apologies for the basic questions.

    In the following simple example http://www.digitalbrit.com/html/why.html why is it that the email and google links attract some of the same behaviour as the navigation items? Click the email link to see what I mean.

    I thought that by specifically targetting the navigation items this would not cascade to other links, but obviously not. And how best to avoid this??

    Second, how do you automatically set a navigation item when opening a page; in my case to trigger the rolled over image?

    Any pointers would be appreciated. I thought that I was getting the hang of CSS but obviously not yet.

    Regards

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by DigitalBrit View Post
    In the following simple example http://www.digitalbrit.com/html/why.html why is it that the email and google links attract some of the same behaviour as the navigation items? Click the email link to see what I mean.
    You seem to think that one can prefix a list of selectors. For instance,

    Code:
    #address a:link, a:visited, a:active {
        text-decoration: none;
    }
    is the same as

    Code:
    #address a:link {
        text-decoration: none;
    }
    a:visited {
        text-decoration: none;
    }
    a:active {
        text-decoration: none;
    }
    There are an additional four rules that are written like that, and all are presumably unintended.

    The first rule above should be:

    Code:
    #address a:link, #address a:visited, #address a:active {
        text-decoration: none;
    }
    I don't understand your second question, so I can't help you there.
    Mike

  3. #3
    Join Date
    Jun 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks

    MWinter - thanks for clearing that up - I can see the mistake now.

    Re the second point I think that I am on to a solution.

    Cheers

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •