This is a discussion on "Images in navi" within the Web Page Design section. This forum, and the thread "Images in navi are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Images in navi
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi Guys!
I have a question. I know how to do the rollover in navigation, but now i would like to use images instead of letters. I have this 2 images the darker one is for the link, and the white one is when you hover over the link. I just cant make it work. Can you guys please help me! Thank you in advance! |
|
|
|
#2
|
|||
|
|||
|
Re: Images in navi
if the home tab was 'home.gif' and the dimensions 100x30, the code (i think) would go summat lyk this:
The HTML:
so this may not work. Last edited by Dapandyman; Dec 9th, 2006 at 20:53. |
|
#3
|
|||
|
|||
|
Re: Images in navi
I tried it but no success, but thank you anyway.
|
|
#4
|
||||
|
||||
|
Re: Images in navi
Use the background switch method. Combine those two images so one is above the other.
|
|
#5
|
|||
|
|||
|
Re: Images in navi
i told you i was a noob... lol
|
|
#6
|
||||
|
||||
|
Re: Images in navi
You had the general idea, but the background switch method is better because it only loads one image so there is no flicker or need to preload.
|
|
#7
|
|||
|
|||
|
Re: Images in navi
I will try it now.
...other q may sound stoopid : does it matter if i use class or id? and should i use gif instead of png? |
|
#8
|
||||
|
||||
|
Re: Images in navi
No, it doesn't really matter whether you use an ID or a class. ID's are good for anchors and JavaScript. Classes are actually more widely supported.
|
|
#9
|
|||
|
|||
|
Re: Images in navi
I tried it but it still not working....
|
|
#10
|
||||
|
||||
|
Re: Images in navi
|
|
#11
|
|||
|
|||
|
Re: Images in navi
Post the page up here, and we can trouble shoot, and see what you did wrong in the code...lol
|
|
#12
|
||||
|
||||
|
Re: Images in navi
The link I gave you is an example in case you missed it for some reason
|
|
#13
|
|||
|
|||
|
Re: Images in navi
I tried to modify the link you gave me Ryan, but i have no luck. Anyway, here is the link. http://www.flowerinstyle.co.uk/try.html.
As you see i have those images as navi buttons but i would like to have the white ones when hover. |
|
#14
|
|||
|
|||
|
Re: Images in navi
Ryan I was wondering if you could explain that example to me, or listen to mine and then fill in the blanks, just hitting a wall whenever I get to a certain point!
Ok, so in the HTML you've set up your list items with links in them, named them appropriately and so on, and you've also given them text values of Home. Now in the CSS you've specified that any link in a list item will be indented off the page, so does that mean the the Text link in the link is wayyy off the page? You also specified that the background for each class is the appropriate gifs so does that mean, that only the gif will be seen, as the text is off-screen? I don't understand the hover part so perhaps you could explain that to me? Thanks in advance, Antwan Last edited by Antwan; Dec 10th, 2006 at 12:53. Reason: Hit the enter button instead of space : ) |
|
#15
|
|||
|
|||
|
Re: Images in navi
Ok! I have manage to do it! Here is the link http://www.flowerinstyle.co.uk/try.html
Thank you guys! My other question is: how can i make the navigation, that Home will be the first and than galery and contact us? Thank you 4 ur help! Last edited by chubbs; Dec 10th, 2006 at 16:21. |
|
#16
|
|||
|
|||
|
Re: Images in navi
yeah, the swapping's very smooth
|
|
#17
|
|||
|
|||
|
Re: Images in navi
Hi Chubbs,
The technique you're going after is tricky depending upon your doc-type. What I can do is recreate what I use on my websites. Give me tomorrow and I'll post. |
|
#18
|
|||
|
|||
|
Re: Images in navi
I've done it already check the link above...
But thank you ! |
|
#19
|
|||
|
|||
|
Re: Images in navi
Hey Chubbs,
I noticed you did get it "functioning" but; There is a cleaner way of doing it. To keep the XHTML and CSS clean as intended by its' purpose of separating content and design. |
|
#20
|
|||
|
|||
|
Re: Images in navi
ohh... ok, so if you can post it later please? iwould like to see it.
Thank you! |
![]() |