Skip to content

Instantly share code, notes, and snippets.

@oki
Created January 7, 2010 17:55
Show Gist options
  • Select an option

  • Save oki/271402 to your computer and use it in GitHub Desktop.

Select an option

Save oki/271402 to your computer and use it in GitHub Desktop.
<body id="nazwa_zakladki"> <!-- np: sessions, settings, accounts, auctions -->
<ul id="tabnav">
<% if logged_in? %>
<li class="sessions"><%= link_to 'Index', root_path %></li>
<li class="items"><%= link_to "Licytacje", items_path -%></li>
<li class="auctions"><%= link_to "Aukcje", auctions_path -%></li>
<li class="accounts"><%= link_to "RapidShare", accounts_path -%></li>
<li class="settings"><%= link_to "Ustawienia", settings_path -%></li>
<% end %>
</ul>
</body>
/* begin css tabs */
ul#tabnav { /* general settings */
text-align: left; /* set to left, right or center */
margin: 1em 0 1em 0; /* set margins as desired */
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
border-bottom: 1px solid #6c6; /* set border COLOR as desired */
list-style-type: none;
padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */
}
ul#tabnav li { /* do not change */
display: inline;
}
body#sessions li.sessions, body#settings li.settings, body#accounts li.accounts, body#auctions li.auctions, body#allegro_users li.allegro_users, body#items li.items { /* settings for selected tab */
border-bottom: 1px solid #fff; /* set border color to page background color */
background-color: #fff; /* set background color to match above border color */
}
body#sessions li.sessions a, body#settings li.settings a, body#accounts li.accounts a, body#auctions li.auctions a, body#allegro_users li.allegro_users a, body#items li.items a { /* settings for selected tab link */
background-color: #fff; /* set selected tab background color as desired */
color: #000; /* set selected tab link color as desired */
position: relative;
top: 1px;
padding-top: 4px; /* must change with respect to padding (X) above and below */
}
ul#tabnav li a { /* settings for all tab links */
padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
border: 1px solid #6c6; /* set border COLOR as desired; usually matches border color specified in #tabnav */
background-color: #cfc; /* set unselected tab background color as desired */
color: #666; /* set unselected tab link color as desired */
margin-right: 0px; /* set additional spacing between tabs as desired */
text-decoration: none;
border-bottom: none;
}
ul#tabnav a:hover { /* settings for hover effect */
background: #fff; /* set desired hover color */
}
/* end css tabs */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment