![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello. I have a navigation bar at the top of all my pages with css-styled buttons that change color when hovered over. I am a little confused on how to disable that for the link that the page is on, for example, the sitemap link in the navigation bar on the sitemap page, the studies link for the navigation bar on the studies page, etc. The css is at http://www.TheBicyclingGuitarist.net/css/style.css The sitemap is at http://www.TheBicyclingGuitarist.net/sitemap.htm Any tips will be greatly appreciated. Do I need to make a new class and surround the relevant link with <span> tags, or is there a better way? Thanks. |
#3
| |||
| |||
|
|
In article <478af24c$0$3969$6e1ede2f (AT) read (DOT) cnntp.org>, "The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net wrote: Hello. I have a navigation bar at the top of all my pages with css-styled buttons that change color when hovered over. I am a little confused on how First, yes, you can just class the link you do not want to have hovering effects; <a class="current" href="...> is a common practice. You then style the .current how you wish in the css. Second, you can also not have the link at all so not even a cursor hand will appear, in this case you might style just the li itself to fit in with the real links in style. It is common and informational to have the text a little different, perhaps in colour or background (this is an extra way for users to know which page they are on out of the choices in the navigation strip. Third, (but I have not studied your site properly so this may not be convenient on the whole) you don't generally need to keep putting class="menu2" if you use #menubar li a to specify a style. It is briefer. |
#4
| |||
| |||
|
|
Hello. I have a navigation bar at the top of all my pages with css-styled buttons that change color when hovered over. I am a little confused on how to disable that for the link that the page is on, for example, the sitemap link in the navigation bar on the sitemap page, the studies link for the |
#5
| |||
| |||
|
|
"dorayme" <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in message news:doraymeRidThis-504DD5.17352614012008 (AT) news-vip (DOT) optusnet.com.au... In article <478af24c$0$3969$6e1ede2f (AT) read (DOT) cnntp.org>, "The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net wrote: Third, (but I have not studied your site properly so this may not be convenient on the whole) you don't generally need to keep putting class="menu2" if you use #menubar li a to specify a style. It is briefer. Thank you for your help, Dorayme. Well I followed the first suggestion so far, but I plan to implement the second suggestion (no link, just styling the li for the current page), and I want to learn how to do the third suggestion. It's a little beyond me right now. I automatically think "tic-tac-toe" when I see #. |
#6
| |||
| |||
|
|
"The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net> wrote in message news:478af24c$0$3969$6e1ede2f (AT) read (DOT) cnntp.org... Hello. I have a navigation bar at the top of all my Oh heck. I just noticed that the navigation bar for the site map page is a wee bit smaller than the navigation bars on all the other pages. I think this is because I have set styles for <p> and <a> in the header of the site map page so they are only 90% regular size (because of all the links on that page). What's the best fix for this without changing the 90% for the body content? |
#7
| |||
| |||
|
|
There are some server side solutions so the page itself "knows" which page it is and "turns off" links to itself. In PHP. |
#8
| |||
| |||
|
|
, Andy Dingley <dingbat (AT) codesmiths (DOT) com> wrote: |
|
On 14 Jan, 06:35, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: There are some server side solutions so the page itself "knows" which page it is and "turns off" links to itself. In PHP. You can do that statically too. Put a "pagename" class onto the body for each page. Use slightly more complex CSS selectors (including a hard-coded list of pagenames) to recognise each of these. The cost of this is needing to hard-code that list into the CSS, but it works, and it works with static code. |
#9
| |||
| |||
|
|
In article <478b14a3$0$3967$6e1ede2f (AT) read (DOT) cnntp.org>, "The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net wrote: "dorayme" <doraymeRidThis (AT) optusnet (DOT) com.au> wrote in message news:doraymeRidThis-504DD5.17352614012008 (AT) news-vip (DOT) optusnet.com.au... In article <478af24c$0$3969$6e1ede2f (AT) read (DOT) cnntp.org>, "The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net wrote: Third, (but I have not studied your site properly so this may not be convenient on the whole) you don't generally need to keep putting class="menu2" if you use #menubar li a to specify a style. It is briefer. now. I automatically think "tic-tac-toe" when I see #. OK, about the third, here is a sort of case where the savings are considerable - might get you to see how easy it is: snip dv id="wrapper">...lots of divs within...</div>. It is a bore (as well as adding to bandwidth and clutter) to class every single inner div. It is easier to target them all in one go by: #wrapper div {float: left; width: ... etc ...;} This targets all the div children of the #wrapper div. Not any other divs elsewhere. You can also use classed wrappers. ID here is just an example (to emphasise that it is unique and therefore a rather nice handle to identify a whole mob of its children). From what I did see of your css, I am sure you do understand this idea to a degree (see your own css!). |
#10
| |||
| |||
|
|
On 14 Jan, 06:35, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote: There are some server side solutions so the page itself "knows" which page it is and "turns off" links to itself. In PHP. You can do that statically too. Put a "pagename" class onto the body for each page. Use slightly more complex CSS selectors (including a hard-coded list of pagenames) to recognise each of these. The cost of this is needing to hard-code that list into the CSS, but it works, and it works with static code. Andy, |
![]() |
| Thread Tools | |
| Display Modes | |
| |