Hi Kim

I read Big John's comment and groaned myself.  It's an easy task once you've done it, 
but getting your mind around the concept isn't that easy.  I remember reading about it 
ages ago and thinking uh, yeah. 

But... I just implemented it on our site.

Here's the simplified version.  You have 5 tabs, Forside, Services, Produkter, Resume, 
and Kontakt.

When you are working on a page that should be in the Kontakt section, give the body a 
class="section-kontakt"
give the list item for kontakt an id or class of kontakt.

Then, your style sheet will say body.kontakt (when there is a body with the class of 
kontakt) ul.tabs (your main nav) li.kontakt (the list item with a class of kontakt) or 
li#kontakt 
or in shorthand
body.kontakt ul.tabs li.kontakt.

Now, lets do the same for your other tabs

body.kontakt ul.tabs li.kontakt, body.forside ul.tabs li.forside, body.services 
ul.tabs li.services, body.produkter ul.tabs li.produkter, body.resume ul.tabs 
li.resume {current tab styles}

The current tab will only be highlighted when the body class matches the list class, 
when they don't match the tabs will be normal. 

You could probably remove the ul.tabs reference, I just added it to be specific.

I hope that helps and is accurate.  Did I get it right Big John?

Ted


-----Original Message-----
From: Kim Kruse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 2:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [WSG] Is it possible...


Hi John,

I'm sorry I just don't get it. It must be a combination of  IQ < 50 and 
css = brain meltdown.

I know it's a lot to ask but if you don't ask.... would it be possible 
with an "for dummies" explanation maybe using the styles in my style sheet?

http://www.mouseriders.dk/
http://www.mouseriders.dk/mouseriders_default.css

Sorry to be such a pain.

Kim



Big John wrote:

>Kim Kruse wrote:
>
>  
>
>>I'm almost ready to add content to this page http://mouseriders.dk/ but 
>>I still have one problem I just can't figure out. Is it possible to 
>>create a style(s) that will show one of the tabs white (you are here 
>>kind of thing)... like I do in the sidenav ?
>>    
>>
>
>No problem. Just give each tab a unique class, and each page
>that is a target of a tab a unique body class as well. Then it's 
>possible to write descendant selectors that only apply to 
>a tab when it's on the page to which it points.
>
>For instance, say a page has a body class of "home" and the 
>tab pointing to the home page has a class of "hometab", then 
>write this:
>
>.home .hometab {styles for the "current" page tab;}
>
>Now those special rules can override the normal styles on
>the tab set. This method allows a series of selectors to be
>grouped together:
>
>.home .hometab, 
>.about .abouttab, 
>.sitemap .sitemaptab
>{styles for the "current" page tab;}
>
>Thus the tabs normally obey the primary tab styles, and
>only if a tab class properly matches up with a body class,
>will the special styles in this block apply to it.
>
>Big John
>
>
>
>=====
>  
>
******************************************************
The discussion list for  http://webstandardsgroup.org/

Proud presenters of Web Essentials 04 http://we04.com/
 Web standards, accessibility, inspiration, knowledge
To be held in Sydney, September 30 and October 1, 2004

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

******************************************************
The discussion list for  http://webstandardsgroup.org/

Proud presenters of Web Essentials 04 http://we04.com/
 Web standards, accessibility, inspiration, knowledge
To be held in Sydney, September 30 and October 1, 2004

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to