473,738 Members | 3,636 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing link for current page

Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so
that they used list markup and I'm quite pleased with them. However, I'm
having a problem with one small aspect of the menu and could use some help
in fixing it.

The problem is that I want the index to always highlight the link for the
content which is currently being displayed on the right hand side of the
page. This behaviour should be over and above the rollovers on the links and
it should work in the three major browsers, IE, Firefox, and Opera.

So, for example, if someone moves their mouse over the "Club Policies" link
in the index, the link should be highlighted as a rollover and if they click
on that link, the browser should show the Club Policies page on the right
AND highlight that link in the index. Naturally, the link should appear
differently than it does for a regular rollover. The highlighting for the
currently-selected page should persist until someone clicks on a new page.
I've got this working fine in IE6 but it doesn't work in Firefox and Opera.
Does anyone know how I could make this work in Firefox and Opera as well?

The basic technique I am using is to have an id for each link in the menu,
like this:
<a href="policies. shtml" id="policies">P olicies</a>

Then, have this in the Policies page:
<style type="text/css">#policies {background: #FF9933}</style>

Can this technique be tweaked so it works in all three browsers? Or will I
have to change it dramatically? Or will this technique simply not work for
all of the three browsers no matter what I do?

By the way, if anyone can think of a technique that doesn't involve putting
any CSS in the HTML markup of the individual pages, I'd love to hear it. The
current technique uses only one line of internal CSS in each HTML page but
I'd prefer none at all....
--
Rhino
Nov 23 '05 #1
3 2644
Rhino wrote:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so
that they used list markup and I'm quite pleased with them. However, I'm
having a problem with one small aspect of the menu and could use some help
in fixing it.

The problem is that I want the index to always highlight the link for the
content which is currently being displayed on the right hand side of the
page. This behaviour should be over and above the rollovers on the links and
it should work in the three major browsers, IE, Firefox, and Opera.

So, for example, if someone moves their mouse over the "Club Policies" link
in the index, the link should be highlighted as a rollover and if they click
on that link, the browser should show the Club Policies page on the right
AND highlight that link in the index. Naturally, the link should appear
differently than it does for a regular rollover. The highlighting for the
currently-selected page should persist until someone clicks on a new page.
I've got this working fine in IE6 but it doesn't work in Firefox and Opera.
Does anyone know how I could make this work in Firefox and Opera as well?

The basic technique I am using is to have an id for each link in the menu,
like this:
<a href="policies. shtml" id="policies">P olicies</a>

Then, have this in the Policies page:
<style type="text/css">#policies {background: #FF9933}</style>

Can this technique be tweaked so it works in all three browsers? Or will I
have to change it dramatically? Or will this technique simply not work for
all of the three browsers no matter what I do?

By the way, if anyone can think of a technique that doesn't involve putting
any CSS in the HTML markup of the individual pages, I'd love to hear it. The
current technique uses only one line of internal CSS in each HTML page but
I'd prefer none at all....


instead of this....

#navlist li a {
color: #ffffff;
background-color: inherit;
text-decoration: none;
display: block;
}


try this....
#navlist li a {
color: #ffffff;
text-decoration: none;
display: block;
}


--
a beef jerky site http://www.choicebeefjerky.com.au
not a beef jerky site http://mycoolwheels.com/vote.cmks
nobody ever dreams of working for the man
Nov 23 '05 #2

"Disco Octopus" <di**********@y ahoo.com> wrote in message
news:1p******** *************** ******@40tude.n et...
Rhino wrote:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so
that they used list markup and I'm quite pleased with them. However, I'm
having a problem with one small aspect of the menu and could use some
help
in fixing it.

The problem is that I want the index to always highlight the link for the
content which is currently being displayed on the right hand side of the
page. This behaviour should be over and above the rollovers on the links
and
it should work in the three major browsers, IE, Firefox, and Opera.

So, for example, if someone moves their mouse over the "Club Policies"
link
in the index, the link should be highlighted as a rollover and if they
click
on that link, the browser should show the Club Policies page on the right
AND highlight that link in the index. Naturally, the link should appear
differently than it does for a regular rollover. The highlighting for the
currently-selected page should persist until someone clicks on a new
page.
I've got this working fine in IE6 but it doesn't work in Firefox and
Opera.
Does anyone know how I could make this work in Firefox and Opera as well?

The basic technique I am using is to have an id for each link in the
menu,
like this:
<a href="policies. shtml" id="policies">P olicies</a>

Then, have this in the Policies page:
<style type="text/css">#policies {background: #FF9933}</style>

Can this technique be tweaked so it works in all three browsers? Or will
I
have to change it dramatically? Or will this technique simply not work
for
all of the three browsers no matter what I do?

By the way, if anyone can think of a technique that doesn't involve
putting
any CSS in the HTML markup of the individual pages, I'd love to hear it.
The
current technique uses only one line of internal CSS in each HTML page
but
I'd prefer none at all....


instead of this....

#navlist li a {
color: #ffffff;
background-color: inherit;
text-decoration: none;
display: block;
}


try this....
#navlist li a {
color: #ffffff;
text-decoration: none;
display: block;
}

Thanks, that did the trick!

Rhino
Nov 23 '05 #3
"Rhino" <no************ ***********@nos pam.com> wrote in
news:sE******** ***********@new s20.bellglobal. com:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca
- so that they used list markup and I'm quite pleased with them.
However, I'm having a problem with one small aspect of the menu and
could use some help in fixing it.

The problem is that I want the index to always highlight the link
for the content which is currently being displayed on the right hand
side of the page. This behaviour should be over and above the
rollovers on the links and it should work in the three major
browsers, IE, Firefox, and Opera.

So, for example, if someone moves their mouse over the "Club
Policies" link in the index, the link should be highlighted as a
rollover and if they click on that link, the browser should show the
Club Policies page on the right AND highlight that link in the
index. Naturally, the link should appear differently than it does
for a regular rollover. The highlighting for the currently-selected
page should persist until someone clicks on a new page. I've got
this working fine in IE6 but it doesn't work in Firefox and Opera.
Does anyone know how I could make this work in Firefox and Opera as
well?

The basic technique I am using is to have an id for each link in the
menu, like this:
<a href="policies. shtml" id="policies">P olicies</a>

Then, have this in the Policies page:
<style type="text/css">#policies {background: #FF9933}</style>

Can this technique be tweaked so it works in all three browsers? Or
will I have to change it dramatically? Or will this technique simply
not work for all of the three browsers no matter what I do?

By the way, if anyone can think of a technique that doesn't involve
putting any CSS in the HTML markup of the individual pages, I'd love
to hear it. The current technique uses only one line of internal CSS
in each HTML page but I'd prefer none at all....


I found the easiest way to do this is to set a style for .current
setting the current page's link to class="current" Make current look
however you'd like; hide the link, set different colors, background,
hovering, etc. It works in all browsers; you just have to remember
when creating/editing the page to make it the current page. Your
method of styling a bunch of ids seems like overkill. Do it once when
you can.

I don't see anything here (haven't looked at your pages) describing
what doesn't work with what browsers. Ids or classes, there should be
no reason that you can't set differences that'll work cross-browser.

Take a look at the bottom horizontal menu at http://abateofnm.org/ and
note my "greyed out" effect.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3947
by: Don G | last post by:
Within the menu for my site, I have inserted 'class="current"' within the link for the current page. So the link looks somthing link: <li><a href="index.php" class="current">Home</a></li> The css for formatting the menu links is: #menu a:hover { background-color: #E00080; color: white;
26
3852
by: Harrie | last post by:
Hi, After Brian mentioned the use for <link rel=..> for navigational purposes in another thread, I've been looking into it and found that HTML 3.2 has two other recognized link types than HTML 4.01, which are "top" and "search". I compared these two pages: http://www.w3.org/TR/REC-html32-19970114#link http://www.w3.org/TR/html4/types.html#type-links
3
1525
by: R.A. | last post by:
Hi I have the web pages developed using c#. When I change the http to https the lock showing the secure site is not showing. Is there more beside changing the http to https to convert the web page to secure? Thanks
6
2246
by: zino | last post by:
my web application consist of 3 frames :top, left and right, and I use form authentication to authenticate users in ASP.NET 1. the right frame is where the data is displayed I set the default page (as it's required by VS) to some of my pages (default.aspx) there is somewhere in the application where an e-mail is sent to some users containing a url with parameters needed by the page (pageX.aspx) to query the database and return the result to...
8
1990
by: johkar | last post by:
I have two problems I cannot work out in the following tab code with Netscape 6. Problems are marked with all cap comments. One is that the background image is not shown in NS 6 (two places in CSS). The second problem is that the top right rounded corner is not showing up in the Tier 2 tabs. Could you have a look and tell me if it is possible to correct? This code seems to work fine in IE 5+ and Firefox. Note that since I can't post...
5
1482
by: jake_allen_no_spam | last post by:
Hi Gurus, I want to incorporate a current web page on my database. How can I include the output from a web page in my database? Thanks in advance, Jake
7
2951
by: underground | last post by:
I have a problem that I've spent countless hours on and I'm more than certain this is a obviuos issue to an expert but I am still learning. I have a paging script that I have modified to display a certian amount of records per page. But when I click on the next link , no new result are displayed it keep displaying the same result. Here is a sample of the script <?php include('hdb.html'); ?> <?php // Get the search variable from URL ...
5
2881
nmm32
by: nmm32 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. I have another procedure which adds another row to the table, which is working fine inside the programming, and in the database. However, I still cannot figure out what am I doing wrong with the DataGrid configurations OR Database OR DataAdapter OR SqlSelectCommand ... I really don't know yet and I...
0
1770
by: cms3023 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. The table inside the database has data that matches with the parameter. I have another procedure which adds another row to the table, which is working fine inside the programming, and in the database. However, I still cannot figure out what am I doing wrong with the DataGrid configurations OR...
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.