SitePoint Enthusiast
How is this done?
At http://www.gospelcom.net/
You could find "navbar" which is "active" (with orange color) when You are visiting that specific section?
How could I do that as is on that site...
Hi,
If you rightClick and view the source, you will see the code the site uses -- onmouseover
Vinny
Web-coding NINJA!
Vinnie - he's talking about the permanent orange color on the currently viewed nav selection (at the top)
They just use a CSS class, "mainMenuSelected"
SitePoint Enthusiast
Yes beetle...THAT IS WHAT I'm looking for ... so How I could do that ...
I need
/* The main menu selected colors */
.mainMenuSelected {
color: #FF9933;
font-weight: bold;
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: none;
}
.mainMenuSelected:visited {
color: #FF9933;
}
.mainMenuSelected:hover {
color: #cc6600;
text-decoration: none;
}
and what else
<a href="/" class="mainMenuSelected">Home</a>
to have this above
<a href...
on every click on navbar section.
cos
WHEN YOU ARE click on different section pageosurce is always different with
<a href="/" class="mainMenuSelected">home or about us or links or etc...
Web-coding NINJA!
Well, since it can be viewed in the HTML, they didn't do it with javascript. Are you wanting a javascript solution?
SitePoint Enthusiast
No...If I could do this on another way...css...any suggestions
Web-coding NINJA!
Well, half of the solution is going to be CSS. The other half (applying that CSS) is up to you. As I see it, you pretty much have 3 choices
1) Hard-code it into the HTML for every page
2) Use javascript to set the className on page load
3) Use a server-side (PHP, ASP, etc) program to code it into the HTML (same as #1, but a dynamic environment).
SitePoint Enthusiast
hey beetle (or anybody else) any suggestions for php+css solution ....
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks