CSS - Problem with a href. When active I want the links to keep thehover color help

Discussion in 'HTML' started by patrice.fiset@gmail.com, Jan 28, 2008.

  1. Guest

    , Jan 28, 2008
    #1
    1. Advertising

  2. Els Guest

    Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    wrote:

    > Hello, can someone good in CSS help me figure out how to set the
    > active color like the hover color for the top menu of this page.
    >
    > http://www.westland-associates.com/properties/northpark/


    I'm guessing that by "active", you mean that while you're on the about
    page, the 'About Us' link should be the colour the 'Home' link is now,
    am I right?

    This is not in the CSS, but in the HTML.
    As you can see in the HTML, the 'Home' link as an ID added:
    id="current". This is what is linked to the CSS to give that colour.
    So, in order to do what you want, you just have to make sure that on
    the about page, this 'id="current"' bit, is not on the 'Home' link,
    but on the 'About Us' link. (and ditto for the other pages of course)

    --
    Els http://locusmeus.com/
     
    Els, Jan 28, 2008
    #2
    1. Advertising

  3. Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    Scripsit :

    > Hello, can someone good in CSS help me figure out how to set the
    > active color like the hover color for the top menu of this page.


    I don't see any active color change, and I don't see why you would like
    to prevent it, since it would be a usability enhancement. What do you
    mean by "active color"?

    > http://www.westland-associates.com/properties/northpark/


    That's confusing, since the "tabs" don't indicate where you are: "Home"
    has gray background, no matter where you are.

    > You can find the CSS file right here:
    > http://www.westland-associates.com/properties/northpark/images/BrightSide.css
    >
    > The structure of the CSS is king of stranger to me any help would be


    It contains syntax errors, to begin with, using nonexistent element
    names.

    But the design is generally poor, and there's little point in trying to
    fix it. An expert would need some time to figure out how to make the tab
    system work at least the way it was meant to work. But using tiny gray
    text as copy text is usually a sufficient indication of a need for total
    redesign, and this is confirmed by the automatic image alternation, a
    major annoyance and obstacle to actually reading any information.

    Unless you really have to, stop working with the site unless the site
    owner asks you what should really be done with it.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Jan 28, 2008
    #3
  4. rf Guest

    Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    <> wrote in message
    news:...
    > Hello, can someone good in CSS help me figure out how to set the
    > active color like the hover color for the top menu of this page.
    >
    > http://www.westland-associates.com/properties/northpark/


    Further to what Els said:

    :active is not what you think it is. It is not the "current page", rather it
    is the currently active link. That is, for example, when the mouse button is
    currently pressed over the link, before the mouse button is released and the
    link is activated, resulting in a get to the server for the href mentioned
    in the link.

    http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes

    As Els implies, changing the colour of the "current" menu item is done
    server side.

    --
    Richard.
     
    rf, Jan 28, 2008
    #4
  5. Guest

    Re: CSS - Problem with a href. When active I want the links to keepthe hover color help

    Thank you guys,

    Yeah CSS is crap, I found that template on a free template website. I
    should learn grrrr.

    I found a fix thought if I had id=current on the right li for this
    page I get the gray.

    <ul>
    <li><a href="index.php"><span>Home</span></a></li>
    <li><a href="about.php"><span>About Us</span></a></li>
    <li><a href="contact.php"><span>Contact Us</span></a></li>
    <li id="current"><a href="driving.php"><span>Driving Directions</
    span></a></li>
    <li><a href="floorplans.php"><span>Floor Plans</span></a></li>
    </ul>


    On Jan 28, 1:02 am, "rf" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > Hello, can someone good in CSS help me figure out how to set the
    > > active color like the hover color for the top menu of this page.

    >
    > >http://www.westland-associates.com/properties/northpark/

    >
    > Further to what Els said:
    >
    > :active is not what you think it is. It is not the "current page", rather it
    > is the currently active link. That is, for example, when the mouse button is
    > currently pressed over the link, before the mouse button is released and the
    > link is activated, resulting in a get to the server for the href mentioned
    > in the link.
    >
    > http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes
    >
    > As Els implies, changing the colour of the "current" menu item is done
    > server side.
    >
    > --
    > Richard.
     
    , Jan 28, 2008
    #5
  6. rf Guest

    Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    <> wrote in message
    news:...
    > Thank you guys,
    >
    > Yeah CSS is crap, I found that template on a free template website. I
    > should learn grrrr.
    >
    > I found a fix thought if I had id=current on the right li for this
    > page I get the gray.
    >
    > <ul>
    > <li><a href="index.php"><span>Home</span></a></li>
    > <li><a href="about.php"><span>About Us</span></a></li>
    > <li><a href="contact.php"><span>Contact Us</span></a></li>
    > <li id="current"><a href="driving.php"><span>Driving Directions</
    > span></a></li>
    > <li><a href="floorplans.php"><span>Floor Plans</span></a></li>
    > </ul>


    Hmmm. Google grouper.
     
    rf, Jan 28, 2008
    #6
  7. Ben C Guest

    Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    On 2008-01-28, Jukka K. Korpela <> wrote:
    [...]
    >> You can find the CSS file right here:
    >> http://www.westland-associates.com/properties/northpark/images/BrightSide.css
    >>
    >> The structure of the CSS is king of stranger to me any help would be

    >
    > It contains syntax errors, to begin with, using nonexistent element
    > names.


    Is that a syntax error?

    e.g.:

    foobar { width: 100px; }
     
    Ben C, Jan 28, 2008
    #7
  8. Re: CSS - Problem with a href. When active I want the links to keep the hover color help

    Scripsit Ben C:

    >> It contains syntax errors, to begin with, using nonexistent element
    >> names.

    >
    > Is that a syntax error?
    >
    > e.g.:
    >
    > foobar { width: 100px; }


    Somewhat debatably, yes. In practical terms, it typically arises from
    mistakenly omitting the "." from ".foobar" (or the "#" from "#foobar").
    In purely CSS syntax, as checked by so-called CSS validators, it is not
    a syntax error.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Jan 28, 2008
    #8
  9. Guest

    Re: CSS - Problem with a href. When active I want the links to keepthe hover color help

    On Jan 28, 3:52 am, "rf" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Thank you guys,

    >
    > > Yeah CSS is crap, I found that template on a free template website. I
    > > should learn grrrr.

    >
    > > I found a fix thought if I had id=current on the right li for this
    > > page I get the gray.

    >
    > > <ul>
    > > <li><a href="index.php"><span>Home</span></a></li>
    > > <li><a href="about.php"><span>About Us</span></a></li>
    > > <li><a href="contact.php"><span>Contact Us</span></a></li>
    > > <li id="current"><a href="driving.php"><span>Driving Directions</
    > > span></a></li>
    > > <li><a href="floorplans.php"><span>Floor Plans</span></a></li>
    > > </ul>

    >
    > Hmmm. Google grouper.


    So you are an idiot grouper
     
    , Jan 29, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    201,743
    Adrienne Boswell
    Jun 20, 2006
  2. Kamaljeet Saini
    Replies:
    0
    Views:
    445
    Kamaljeet Saini
    Feb 13, 2009
  3. Mario Ruiz

    getting the css href links

    Mario Ruiz, May 25, 2009, in forum: Ruby
    Replies:
    0
    Views:
    104
    Mario Ruiz
    May 25, 2009
  4. Soren Vejrum
    Replies:
    4
    Views:
    667
    Lasse Reichstein Nielsen
    Jul 5, 2003
  5. saiho.yuen
    Replies:
    3
    Views:
    455
    kaeli
    Sep 14, 2004
Loading...

Share This Page