Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-28-2005, 04:21 PM
WebProWorld Pro
 

Join Date: Mar 2005
Location: Los Angeles
Posts: 267
supernatural_247 RepRank 1
Default making button tabs stick

I'm using php and I have my index page including the header file. In that header is the code for the title, metatags, logo, and top navigational buttons.

i'm trying to figure out how to make it so that when a user clicks a nav button, it switches the image to a new image... see www.careerbuilder.com as an example.

btw, didn't know which forum would be best to discuss this so i posted this in design as well...

thanks in advance!!
Tim
__________________
iHomeConnect
Reply With Quote
  #2 (permalink)  
Old 08-28-2005, 07:37 PM
WebProWorld Pro
 

Join Date: Jul 2005
Location: UK
Posts: 166
Steve W RepRank 0
Default

If you're using css for styling it's pretty simple:

Give each page body a unique id e.g. <body id="home"> for home page and <body id="contact"> for contact page etc...

Then give each tab of your nav a unique id also, so if you're using lists, <li id="home_tab"><a ... /a> or if just using links, <a href="/" id="home_tab" .../a>

In your css file, set the background as you see fit like so:

body#home #home_tab { background:#aaaaaa url(/path/to/image/if/reqd) 50% 50%; }

body#contact #contact_tab {.....}

The #aaaaaa is the hex bg color.
The url(...) is an image if you want to use one.
The 50% 50% means half way along, half way down to centre a background image...

Using css the possibilities are endless, you could always use js rollovers but they're not so SE friendly and only work if js is turned on in the browser...
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0