|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/15/2007 11:33:09 AM
Posts: 3,
Visits: 16
|
|
| Thanks for a wonder video. I learn a lot from this video. But I still have one question. If you are using the same set of rollovers on mulitpe pages or a Master Page how would disable or grayout the button for the current page? Thanks, Joe
|
|
|
|
|
Forum Newbie
      
Group: Administrators
Last Login: 2/21/2008 8:03:24 AM
Posts: 7,
Visits: 12
|
|
that depends, are you using the sitemap datasource and web.sitemap in your website?
---------signature-----------
Learn Visual Studio Inc. Developer / Trainer
www.learnvisualstudio.net
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 10/24/2008 2:27:36 PM
Posts: 437,
Visits: 632
|
|
I don't know if Jim has a better solution, but what I do takes just a bit more code. If you've followed the CSS rollover video you need to add a few things.
First you need to give each of your li elements an id, so something like;
<*li id="Home">Home<*/li>
Then in your CSS you need to control those ids, like so;
body#Home li#Home a { background-position: 0px -23px; }
The final step is to return to your HTML file and give your body the active id;
<*body id="Home">
(Note: Remove the * from the code above)
So what is that doing? The first bit is giving each individual button (li) its own unique ID, so we can call to that button when we want it to be the active page. The second bit almost works like an if statement. By inserting body#Home that line will only change the position of the li if the body id is Home. So if the body is set to home, like we did in the third bit, the line with the ID of Home will change the background position.
You would then replicate that for any buttons you have/need. So put all of the instances into your CSS file, and then just change the body ID when you need that button to be active.
=========================
My wife has given birth to our twins, so I'm still going to be spotty around here. It never seems to correct itself does it? I'm sorry, I'm trying.
=========================
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/15/2007 11:33:09 AM
Posts: 3,
Visits: 16
|
|
| Thanks Dustin, you have given me food for thought. What I think I want to to is make the button for the current page I'm on with a grayed image and no link. But I'm not sure on how to do that. I guess I will have to play around with that. First I will have to, on page load, find out which page I'm loading and then assign the <li> tag for that button the gray image. This is where I can use the id field:value pair for each of the <li> tags. Then add the button text without a link. For the gray image I could just add it to the bottom of the "normal-hover" image and make it the "normal-hover-inactive" image. Another problem I'm having is that I have the button in a left-column div tag with a right-column div tag next to it and a footer div tag below it. I clear both floats in the footer div tag, but because the css for the ul and li tags give a height value the footer and column div tags are on top of each other. Any suggestions. Thanks,
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 1/15/2008 1:17:28 PM
Posts: 38,
Visits: 175
|
|
| Hey, Regarding the buttons what Dustin said is proberly the best soloution which is just set a li id for the active page. Then on each page for example home you could just remove the hyperlink from the unordered list, but if you are using a sitemap or an xml source you would need to code this in. If you are using asp.net you can use the ready made menu tree and set the active page function. Now with your problem with the footer overlapping the columns. the unordered list shold not create a problem. you shoul try setting the height property for the columns or setting the min-height prehaps this may overcome the problem. if you paste the code i could take a look for you mike..
http://www.jrdesignstudio.com
|
|
|
|