Jump to content


This topic is now archived and is closed to further replies.



Recommended Posts

Ok this one should be relativly easy for you hardcore coders out there...I was browsing on Wiki one day and decided that my page needs those slick Tabs at the top aswell... I looked at quiet a few tutorials examples you name it. I got the Tabs looking nice and everything but i till have a slight problem. The "active" tab, the tab that is standing out from the other when its clicked. Annoyed, confused, and devestated, i spent several hours looking at more examples and this is what i found out. When ever you click a link, MAGICALLY the tab has a ID tag in the hyperlink. So instead of a href="blah.html"> it now has a href="blah.html" id="selected"> or the similar. This would be pretty much common sense, the link now has the propertied given by the style sheet under #selected. Only problem is...how in the HELL do you get that ID tag there in the first place? i mean all these tutorials are great, but they dont show me how they get this Tag there. I've even thought about using PHP, such as this (im not a php coder, so this WILL be wrong) a href="blah.html" value="selected"> then when you click the link, it will submit the value, such as a POST field in php, out it into a string, and then in my body id="$string"> thus giving me the effect. Is this possible? if so, how? I would much rather go the css route though. I hope ANYBODY out there could help me :(

Thanks in advance

Share this post

Link to post
Share on other sites
To the id bit is not a tag it is a HTML attribute. Attributes are the little commands inside a HTML tag ie, class, ie, href etc.

To get the id there you just simple type it in! Ie on blah.html you do this:
[code]<a href="blah.html" value="selected">Blah page</a><a href="blah2.html">Blah2 page</a>[/code]
Then when you cliick on Blah 2 page it goes to blah2.html and in that file you just code id="selected" in the secound acnhor and remove the id from the first anchor tag.

This is how this effect is done.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.