Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    Hi there,

    Sorry this is a really silly question. I have a website designed and nearly finished coding. I am looking for the rollover or hit state where it the text in the navigation stays bold on whatever page you are on.

    for example if you're on the index page the 'home' navigational link will be bold and the other links wouldnt be. then you click on services and 'services' will now become bold and 'home' wouldnt be.


    I hope this makes sense.

    Thank you !

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    The only silly question is the one left unasked...

    In your navigation, you set up a class called "active": or "current" or whatever word is meaningful to you - then you set that class on the link for the page.
    For example, to highlight the homepage:

    <ul id="nav">
    <li><a href="index.html" [COLOR=rgb(255, 0, 0)]class="current"[/COLOR]>Home</a></li>
    <li><a href="portfolio.html">Portfolio</a></li>
    <li><a href="about.html">About</a></li>
    <li><a href="faq.html">F.A.Q.</a></li>
    <li><a href="contact.html">Contact</a></li>
    </ul>


    Then in your CSS file you do this:

    .current {font: bold small-caps 1.4em arial ;}

    Or whatever styling you want for the link

    If you want to see it in action, visit my site (the middle one in my signature) and look at the source code.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    thanks for the fast response!

  5. #4
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    does this code still work for images? my navigation are images.

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Depends on what you want to have happen with your images - can you post a link?
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  7. #6
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    sure, www.peachy.co.nz/website. I want the exact same thing as your digitalinsite.ca but with the images i have.

  8. #7
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    OK - try this:

    Make the "current" class, put it on the link like this"

    <a href="index.html" [COLOR=rgb(255, 0, 0)]class="current" [/COLOR]onmouseout="MM_swapImgRestore()"etc. etc....>

    and in the CSS put this :

    .current {background: url(images/rollover_home.png);}

    Also looks like you're using Dreamweaver... you might like to try putting your javascript into its own file - keeping things separate cuts down on load times and also makes for easier editing down the road...
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  9. #8
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    Cheers,

    What javascript we talking about? the navigational script?

  10. #9
    Junior Member
    Join Date
    Feb 2011
    Posts
    24
    Member #
    26993
    and it didnt work, as you can see on the website.

    www.peachy.co.nz/website.

    i dont mind coding it again i just wanted to get that styled typography for the navigation.

    thanks for your help

  11. #10
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Yeah, I see what you mean - the images are coded into the HTML so the CSS can't change them. You'd have to take them out of the HTML and put them into the CSS -I'll play with it a bit and see what I come up with, but probably not til tomorrow.
    And yes, the mouseovers are what I think should go into a separate javascript file
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:32 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com