SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: How is this done?
-
Aug 2, 2003, 08:38 #1
- Join Date
- Apr 2003
- Location
- Europe :-)
- Posts
- 25
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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...
-
Aug 2, 2003, 08:45 #2
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
If you rightClick and view the source, you will see the code the site uses -- onmouseover
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Aug 2, 2003, 09:46 #3
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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"
-
Aug 3, 2003, 14:20 #4
- Join Date
- Apr 2003
- Location
- Europe :-)
- Posts
- 25
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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...
-
Aug 3, 2003, 21:11 #5
-
Aug 4, 2003, 06:38 #6
- Join Date
- Apr 2003
- Location
- Europe :-)
- Posts
- 25
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No...If I could do this on another way...css...any suggestions
-
Aug 4, 2003, 08:30 #7
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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).
-
Aug 6, 2003, 05:40 #8
- Join Date
- Apr 2003
- Location
- Europe :-)
- Posts
- 25
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hey beetle (or anybody else) any suggestions for php+css solution ....
Bookmarks