Jump to content

CSS/PHP Tabs


Bavilo

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
Mike
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.