I'm a complete RSS/CSS noobie, and I'm having some trouble getting this code to work. Basically what I want to do is the following: have a navigation bar using the tabset element from Librocket (for an option screen). I'm having trouble maintaining an active / pressed state (to show the user which tab is active). I've tried using ":focus", but focus is lost once I click somewhere else. If i use ":active", the active state only remains if I hold the mouse button down on the object.
Anyway, here's the RSS code:
/* Force the tabset element to a fixed size. */
tabset
{
display: block;
width: 100%;
height: 100%;
border: solid;
}
/* Display the tab container as a block element 20 pixels high; it will
be positioned at the top of the tabset. */
tabset tabs
{
display: block;
height: 20px;
}
/* Force each tab to only take up 80 pixels across the tabs element. */
tabset tab
{
width: 80px;
border: solid;
border-width: 1px 1px 0 1px;
}
/* DOESN'T WORK
tabset tab:focus
{
background-color: #DEADBEEF;
border: solid;
border-width: 1px 1px 0 1px;
}*/
/* DOESN'T WORK
tabset tab:active
{
background-color: #DEADBEEF;
border: solid;
border-width: 1px 1px 0 1px;
}
*/
/* Display the panel container as a block element 180 pixels high; it will
be positioned below the tab container and take up the rest of the space
in the tabset. */
tabset panels
{
display: block;
height: 100%;
border: solid;
}
/* Fix each panel to take up exactly the panelled space. */
tabset panels panel
{
display: block;
width: 100%;
height: 100%;
border: solid;
border-width: 1px 1px 0 1px;
}
And an excerpt of the RML (HTML-ish) code:
<game id="game">
<tabset style="height: 100%;">
<tab>Gameplay</tab>
<panel>
GAMEPLAY TAB GAMEPLAY TAB GAMEPLAY TAB GAMEPLAY TAB GAMEPLAY TAB <br />
</panel>
<tab>Video</tab>
<panel>
VIDEO TAB VIDEO TAB VIDEO TAB VIDEO TAB VIDEO TAB VIDEO TAB <br />
</panel>
</tabset>
I cannot use any javascript code, as Librocket doesn't support that. Thanks in advance!