Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7543323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:23:48+00:00 2026-05-30T08:23:48+00:00

I am currently building a basic website. So far so good, however it’s getting

  • 0

I am currently building a basic website. So far so good, however it’s getting rather cluttered. One reason is that I have a seperate header for each page because I have no script to change buttons when hovering or when the page a button linked to is the current page.

I have these button states:

  • ????_selected_idle (active if the button links to the active page)
  • ????_selected_hover (active if the button links to the current page AND the user hovers)
  • ????_default_idle (normally active)
  • ????_default_hover (normally active + hover)

???? can be ‘home’,’about’,’register’,’products’,’contact’

so in total there is 20 images.

Here is what I use now (this is on the ABOUT page):

<td width="173px" Height="103px">
<a href="/index.php">
    <img src="/Images/home_default_idle.jpg" onmouseover="this.src='/Images/home_default_hover.jpg'" onmouseout="this.src='/Images/home_default_idle.jpg'" width="100%" height="100%" border="0" alt="Home selected">
</a>

And here is the same code but on the HOME page.

<td width="173px" Height="103px">
<a href="/index.php">
    <img src="/Images/home_selected_idle.jpg" onmouseover="this.src='/Images/home_selected_hover.jpg'" onmouseout="this.src='/Images/home_selected_idle.jpg'" width="100%" height="100%" border="0" alt="Home selected">
</a>

Any help is much appreciated! If you wish to look at the website here is the link.

  • If you visit the page don’t pay to much attention to the content yet, it’s still a WIP.
    EDIT:

Right now I have FIVE essential pages.

  • Home
  • About
  • Contact
  • Register
  • Products

all of these pages have their own headers. THese headers are in seperate files. My goal is to make a single header that applies to all pages.

However, there is a reason I have all these several header files. I have them seperate because the buttons change state depending on which page you are on.

Say you are at the HOME page, the HOME button than is this picture:
– home_selected_idle

If you’d hover over that button it would have to change to:
– home_selected_hover

If you were on the ABOUT page and you’d look at the HOME button it would have to be:
– home_default_idle

If you were to hover over that button it would change to:
– home_default_hover.

Basically my iamge structure is like this:
– pagename_state_mousestate

  • pagename
    • home
    • about
    • products
    • register
    • contact
  • state
    • default
    • selected
  • mousestate
    • idle
    • hover
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:23:49+00:00Added an answer on May 30, 2026 at 8:23 am

    Ok I will give you a small example in php:

    For header link, you are going to want to use CSS rather than an image.

    You will want to dynamically change the class of each element like this:

    <div class="<? if($_SERVER['PHP_SELF']=="home.php"){echo "selected";}else{echo "ghosted";} ?>" > HOME </div>
    

    You will just copy paste that format for each one. No need for a JQuery lib it’s too simple for that. Just rework your images to be CSS, thats standard anyway, images take to long to load for mouseover events and CSS is more flexible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently building a Java app that could end up being run on many
I am currently building in Version 3.5 of the .Net framework and I have
We're currently building an application that executes a number of external tools. We often
I'm currently building a small web application that includes a fair amount of JavaScript.
I am currently building a small website where the content of the main div
I'm currently building a GWT login screen and I managed to get a basic
I am currently building a Rails 3.2 application that uses the gem sunspot to
I'm currently building an order form but it seems that the method I am
We're currently building a system that abstracts all kinds of technical details about web
I'm building a notification framework and for that I'm serializing and deserializing a basic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.