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

E

Els

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)
 
J

Jukka K. Korpela

Scripsit (e-mail address removed):
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"?

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.
 
R

rf

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.
 
P

patrice.fiset

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>
 
R

rf

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.
 
J

Jukka K. Korpela

Scripsit Ben C:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top