|
pageoneresults -> CSS Beveled Button Effect - Vertical Format (5/16/2003 9:49:00)
|
Okay, you css fans are really gonna love this one. I' ve been working on a navigation menu built purely in css that to many may look like a graphical button structure. My goal this year is to strip as many graphics that I possibly can from future design projects and use pure css. Here is the menu code, this is for a stacked left hand vertical navigation menu... #menu{ position:absolute; left:9px;top:114px; width:116px; } #menu a{ display:block; font-size:11px; color:#efefef; background:#369; text-decoration:none; padding:2px; margin:0px; border-top:1px solid #ccc; border-left:1px solid #ccc; border-right:1px solid #808080; border-bottom:1px solid #000; } #menu a:hover{ color:#369; background:#ccc; } #menu a:active{ color:#369; background:#f9d543; } You would of course adjust the attributes to meet your requirements. Now, here comes the spice... #bindex a#index, #bcfp a#cfp, #bcmt a#cmt, #bcontact a#contact, #bemail a#email, #bhistory a#history, #bholdings a#holdings, #bintro a#intro, #bmarkets a#markets, #bmta a#mta, #bperformance a#performance, #bportfolios a#portfolios, #bmi a#mi, #big a#ig, #bmp a#mp, #bprofile a#profile, #bresources a#resources, #bsaafti a#saafti, #bsite a#site{ color:#369; background:#efefef; } The code directly above is what controls the on page state of the button depending on which page you are on. These are what is referred to as ids. You have to assign a unique id to each link so that you can control the active state. Then, depending on which page you are on, you assign a unique id to the body tag like this... <body id=" #bindex" > That body id tells the browser what the state of the active button should look like when the visitor is on that page. The link in the include looks like this... <a title=" Home Page" id=" index" href=" http://www.gobcafunds.com/" >Home Page</a> The left hand menu is set up as an include. You can view the code for the menu here... www.gobcafunds.com/navigation/left.asp www.gobcafunds.com/navigation/left-bca.asp To see the menu in action, you can visit the main site here... www.gobcafunds.com Now, this is not for the casual css user who fiddles every now and then with css. This took me a while to learn and figure it all out. Now that I have, there is no turning back. Many thanks go to Nick_W, papabaer and keimano tokoyami who provided the on page active state css solution for the buttons. Ah, this css is so much fun!
|
|
|
|