Graphical Autonav
Permalink 1 user found helpful
Hi
I am trying to replicate a graphical menu. I have built a bog standard HTML site and am converting it to C5 theme - or trying, with varying success.
Attached is a screengrab of how the menu should look (correct.gif). It is an <ul> with bckground images attached with css to the <li> elements.
I can't seem to get the bg images to show up on the autonav, although I have managed to get it in the right position and spacing etc. see other attached file: c5.gif - only 3 pages added so far, that's why there are only 3 'buttons' and I have given them a red bg colour with css so I can see where they are.
Would I be better off just adding the images for the buttons to the sidebar and adding links to the pages from them instead? It's just that I would like an <ul> because that's more correct for accessibility and W3C standards.
Thanks
Al
I am trying to replicate a graphical menu. I have built a bog standard HTML site and am converting it to C5 theme - or trying, with varying success.
Attached is a screengrab of how the menu should look (correct.gif). It is an <ul> with bckground images attached with css to the <li> elements.
I can't seem to get the bg images to show up on the autonav, although I have managed to get it in the right position and spacing etc. see other attached file: c5.gif - only 3 pages added so far, that's why there are only 3 'buttons' and I have given them a red bg colour with css so I can see where they are.
Would I be better off just adding the images for the buttons to the sidebar and adding links to the pages from them instead? It's just that I would like an <ul> because that's more correct for accessibility and W3C standards.
Thanks
Al
Good answer sebastienj, just wanted to let you know that the code tags are like this:
[c0de][/c0de]
Replace the '0' with a lowercase 'o'.
Thanks!
[c0de][/c0de]
Replace the '0' with a lowercase 'o'.
Thanks!
in the same time :-)
Fab - thanks!
I'll give it a go and let you know.
:)
I'll give it a go and let you know.
:)
OK I have tried and it doesn't seem to be working.
I followed the instructions in the Primer: Auto-Nav Block Article at the bottom "Further Experimentation" and made a file called testing.php which is a duplicate of concrete/blocks/autonav/templates/view.php
I pasted the new code in there and added it to the root blocks dir and applied as a template to my autonav.
My css looks like this for the home button:
li a.home {background:url(images/home.gif) no repeat;}
li a:hover .home {background:url(images/home-on.gif) no-repeat;}
I also tried .home li a as a selector but that's not working either.
Any ideas what I am doing wrong?
Thanks
Al
I followed the instructions in the Primer: Auto-Nav Block Article at the bottom "Further Experimentation" and made a file called testing.php which is a duplicate of concrete/blocks/autonav/templates/view.php
I pasted the new code in there and added it to the root blocks dir and applied as a template to my autonav.
My css looks like this for the home button:
li a.home {background:url(images/home.gif) no repeat;}
li a:hover .home {background:url(images/home-on.gif) no-repeat;}
I also tried .home li a as a selector but that's not working either.
Any ideas what I am doing wrong?
Thanks
Al
You might try using cufon for the nav will depend on the license if you can generate it or not.
http://cufon.shoqolate.com/generate/...
Steph
http://cufon.shoqolate.com/generate/...
Steph
Hi,
there's at least a typo in your CSS, and your problem in general is most probably related to a wrong CSS selector.
You should change this...
...to this:
In case this isn't enough please post a) the generated HTML from your browser's source code view and b) more from your CSS - maybe you can attach both files to your next post.
HTH!
Regards,
stromberg
there's at least a typo in your CSS, and your problem in general is most probably related to a wrong CSS selector.
You should change this...
li a.home {background:url(images/home.gif) no repeat;} li a:hover .home {background:url(images/home-on.gif) no-repeat;}
...to this:
li a.home {background:url(images/home.gif) no-repeat;} li a.home:hover {background:url(images/home-on.gif) no-repeat;}
In case this isn't enough please post a) the generated HTML from your browser's source code view and b) more from your CSS - maybe you can attach both files to your next post.
HTH!
Regards,
stromberg
Very embarrassed about the schoolgirl error on the CSS - it was genuinely a typo though, after typing and re-typing this again and again in different combinations!
Thank you everyone for your help.
This is what finally worked:
li.home {background:url(images/home.gif) no-repeat;}
li.home a:hover {background:url(images/home-on.gif) no-repeat;}
And for the currently selected page:
li.home .nav-selected {background:url(images/home-on.gif) no-repeat;}
Thanks again for all your patience and advice.
Cheers
Al
Thank you everyone for your help.
This is what finally worked:
li.home {background:url(images/home.gif) no-repeat;}
li.home a:hover {background:url(images/home-on.gif) no-repeat;}
And for the currently selected page:
li.home .nav-selected {background:url(images/home-on.gif) no-repeat;}
Thanks again for all your patience and advice.
Cheers
Al
in the template you can add class to your <li>. these class take the name of your page. like :
<li class="about">...</li>
to do that just change in the view.php of your autonav block
It's one of many solution possible..