I have being trying to teach myself how to build a web site and am very slowly plodding along.
I want to build a navigation bar that is similar to this http://www.text-link-ads.com/r/agencies (the three headers “Advertisers”, “Publishers” and “Agencies” bar) Instead of spending months trying to work it out myself I was hoping some kind soul may try and help me
I want to replicate the a colour line running underneath the tab and especially the fact that it changes to the same colour as each tab that you click on.
I also want all of my tabs to be small like the Agencies tab except I want the tab for the page you are on to be larger than the others, I also want it to change for each tab you click on so that the tab you are on at any one time is always the largest.
Also is this possible just using images, css and html as I have no concept of anything more advanced like javascript etc. Please let me know if this is possible and how I would do it.
Sorry I haven’t got the site set up anywhere yet I was just concentrating on trying to get something developed before I started to find out how I get a site hosted etc. I wouldn’t even know where to start just yet so I can’t even just set it up quickly for you to have a look at. I could post up all my code to show where I am up to for the site with the new nav bar rather than the example one we have been using.
I have got it working with the line underneath as per your suggestion but I am still looking for the way to do the one pixel border like the atttachments on the previous post. I tried to find examples on the web and have found the sliding doors technique on A List Apart http://www.alistapart.com/articles/slidingdoors/ which I am going to work through. Do you think this will help me achieve what I want to do or do you know if there are any other tutorials that I could follow that would give me a similar sort of navigation bar that I can then adapt it.
This is not as difficult as it look. You could accomplish that in different ways. You could use a different header image for every page or a different bottom border color. I made something quick. See if that can work for you:
I can’t see your attacment as yet since it’s pending approval! One question though. Is there a big color difference between the normal and hover state?
If so you could add an extra class, i.e.
.header .menu li a:hover,
.header .menu li a:focus,
.header .memu li a.current{
background-position: 0 -51px;
}
Then when you for example on the advertisers page the link would look like
Wow. That is great just what I hoped for. I have got it working and I am trying to deconstuct it to work out what does what, there are a few sections I don’t understand what they do or what they are for. I am going to work on it over the next few days and try to build it into my concept.
Would it be easy to use images for the tabs as I wanted to use rounded corners and few other bits to go with another thing I have on the site.
Anyway I’ll come back with a few questions if that is ok once I have got completely stuck.
Thanks ever so much Donboe for spending a bit of time putting something together. I’ll have a look at it tonight and see if I can grasp it and work through it.
It really does amaze me how supportive people are on here, I have seen numerous examples of people being prepared to spend their own time to help others and I think it is great.
Thanks again Donboe I’ll report back with how I get on later (once the kids are in bed)
I just can’t seem to make that work, I have given it a go this morning but have had problems with just getting the image to show. I’ll give it another go on my lunch but if you get the time would it be possible to post up the full code. Thanks ever so much
Thanks again for the help. It is just what I was looking for and I’ve been playing about with it trying to get it just how I want it. I love the hover technique and will definately be using that in my site.
There is one last bit I could do with some help on, I have 8 tabs running across using four colours but the border line underneath merges into the two tabs of the same colour not differentiating which tab is at the front. I have knocked up an example of what I mean "Example Nav Bar (Before). I want a thin line to define each tab when it is selected see “Example Nav Bar” attachment for what I am trying to achieve. Any suggestions of how I can acheive this would be really appreciated.
Just in case I haven’t said it enough Thanks ever so much for your help it is really helping me learn
Do you know how I can get my attachments approved or is there another way to show the images?
I think I understand what the above does (it shows the active tab as always in the hover state - is that right?). I tried it though and can’t get it to work so I am not sure what I am doing wrong.
I don’t intend having much of a colour difference between the hover and non hover state though just something subtle so I could still do with the 1px line to stop it merging. Would the other way you have suggested work or is there a different way? Sorry I am getting a bit lost now