View Full Version : A different kind of NavBar Question
digitalpins
Sep-14-2006, 12:24 PM
If I wanted to create a html only gallery and lets say I wanted to have a vertical navbar on the left side and then on the right I want a different image to appear as I scroll up or down... how can I do that? I have been googling all day and reading and just cant figure it out.
Thanks alot for anyone who can help.
Mike Lane
Sep-14-2006, 12:31 PM
If I wanted to create a html only gallery and lets say I wanted to have a vertical navbar on the left side and then on the right I want a different image to appear as I scroll up or down... how can I do that? I have been googling all day and reading and just cant figure it out.
Thanks alot for anyone who can help.
eh... Huh?
:scratch
I'm not sure I follow what you mean.
digitalpins
Sep-14-2006, 01:02 PM
lol ok sorry if I confused you, lets see if I can explain a little clearer
Ok below is a quick pic for the idea I may use sometime in the future, now what is in red would be where the person scrolls over the navbar and the image to the right is what would pop up along with the text on the navbar turning red. Also I would like the navbar to be linkable to galleries I choose.
So the same thing would happen when hovering or scrolling the mouse over the other navbar links but instead the images would change.
http://digitalpins.smugmug.com/photos/95340282-M-1.jpg
Sorry for the confusion but hope u understood that
Mike Lane
Sep-14-2006, 01:11 PM
lol ok sorry if I confused you, lets see if I can explain a little clearer
Ok below is a quick pic for the idea I may use sometime in the future, now what is in red would be where the person scrolls over the navbar and the image to the right is what would pop up along with the text on the navbar turning red. Also I would like the navbar to be linkable to galleries I choose.
So the same thing would happen when hovering or scrolling the mouse over the other navbar links but instead the images would change.
http://digitalpins.smugmug.com/photos/95340282-M-1.jpg
Sorry for the confusion but hope u understood thatIt'll be something similar to the method found on this page: http://www.cssplay.co.uk/menu/gallery.html
What you'll be doing is putting a span inside the link along with the text. The span will default to being either not displayed or maybe more easily hidden and on hover you will set the display to block or set the visibility to visible. You'll be putting all this in its own container that has position:relative specified to it. The link list is easy to make since it's an unordered list without bullets, the li's will contain a span. You will need to uniquely ID either the li elements or the spans that they contain. Then set the position of the spans to absolute and then for each unique span set the background, width and height to be whatever you want.
I think I made it sound much more complex than it really is :lol3 Let me know if you want more help.
digitalpins
Sep-14-2006, 01:30 PM
thanks... sounds like alot of work, dont exactly know where to put that span thing
Theres a bit I dont understand like the "position of the spans to absolute"?
And to "uniquely ID either the li elements or the spans that they contain" are you talking about the items locations and what pictures they are?
thanks for the help
Mike Lane
Sep-14-2006, 01:43 PM
thanks... sounds like alot of work, dont exactly know where to put that span thing
Theres a bit I dont understand like the "position of the spans to absolute"?
And to "uniquely ID either the li elements or the spans that they contain" are you talking about the items locations and what pictures they are?
thanks for the helpOkay :lol3 something like this
HTML
<html>
<div id="myRollover">
<ul>
<li id="link1"><a href="#"><span> </span>Link 1 Text</a></li>
<li id="link2"><a href="#"><span> </span>Link 2 Text</a></li>
<li id="link3"><a href="#"><span> </span>Link 3 Text</a></li>
</ul>
</div>
</html>
Then the CSS could be something like this:
CSS
/* Set up the box for the rollover content */
#myRollover {
position:relative;
width:750px;
border:0;
margin:0;
padding:10px;
}
/* Adjust the display of the unordered list */
#myRollover ul {
margin:0;
list-style:none;
}
#myRollover li {
margin:0;
padding:2em 3em;
}
#myRollover li a:link,
#myRollover li a:visited {
color:#fff;
}
#myRollover li a:hover,
#myRollover li a:active {
color:#f00;
}
/* set up the span elements */
#myRollover li span {
visibility:hidden;
position:absolute;
width:600px;
height:400px;
top:10px;
right:10px;
}
/* set the hover state to show the span elements */
#myRollover #link1 a:hover span {
visibility:visible;
background:url(http://username.smugmug.com/photo/XXXXXXX-L.jpg)
}
#myRollover #link2 a:hover span {
visibility:visible;
background:url(http://username.smugmug.com/photo/YYYYYYY-L.jpg)
}
#myRollover #link3 a:hover span {
visibility:visible;
background:url(http://username.smugmug.com/photo/ZZZZZZZZ-L.jpg)
}
You'll have to customize it to suit and there may be unknown hurdles yet to be cleared, but this is a start and it'll be difficult to visualize problems until it is live.
digitalpins
Sep-14-2006, 04:55 PM
ok thanks alot I will give it a shot and play around with it:clap
brandofamily
Sep-14-2006, 07:04 PM
ok thanks alot I will give it a shot and play around with it:clap
Go to my site... click the slide show image to enter... look at the "hover gallery" on that page... Is that what you are looking for... only with word not the images to hover and set vertical not horizontal....
If so let me know I can show you my code as a start....
I hope you have FF and WD or you'll go nuts trying to line things up...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.