473,498 Members | 1,838 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">Policies</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 2632
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">Policies</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**********@yahoo.com> wrote in message
news:1p*****************************@40tude.net...
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">Policies</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***********************@nospam.com> wrote in
news:sE*******************@news20.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">Policies</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
3917
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...
26
3814
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...
3
1514
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...
6
2223
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...
8
1978
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...
5
1473
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
2933
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...
5
2857
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...
0
1759
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...
0
7167
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,...
0
7208
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...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
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...
1
4915
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
657
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
292
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...

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.