Good Afternoon,
I have a small problem I am sure that it has an easy answer. I have created tabs using Unorderd list. My problem is I dont know how to make the tab that is clicked/or navigated to stay a certain colour.
For Example, I have Tab 1, tab 2 tab 3. The hover color is red the inactive color is blue and the active tab color is White. When click on tab 2 or three it does not deactivate tab 1 and change tab 2 to white?
I hope I made it clear. Below I have added the Tab CSS as well as the HTML code I have used.
CSS
.Tabs {
}
/* Tab navigation */
ul.primary {
border-collapse: collapse;
padding: 0 0 0 1em;
white-space: nowrap;
list-style: none;
margin: 5px;
height: auto;
line-height: normal;
border-bottom: 1px solid #bbb;
}
ul.primary li { display: inline; }
ul.primary li a {
background-color: #ddd;
border-color: #bbb;
border-width: 1px;
border-style: solid solid none solid;
height: auto;
margin-right: 0.5em;
padding: 0 1em;
text-decoration: none;
}
ul.primary li.active a {
background-color: #FFFFFF;
border: 1px solid #bbb;
border-bottom: #fff 1px solid;
}
ul.primary li a:hover {
background-color: #eee;
border-color: #ccc;
border-bottom-color: #eee;
}
HTML Code
<ul class = "Tabs primary">
<li><a href="#" onclick="MM_showHideLayers('layProducerData','','show','layProducerContacts','','hide','layProposals','','hide','layNotes','','hide')"><br />
Producer Data</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','show','layProposals','','hide','layNotes','','hide')">Producer Contacts</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','hide','layProposals','','show','layNotes','','hide')">Proposals</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','hide','layProposals','','hide','layNotes','','show')">Notes </a></li></ul><br />
<br />
Thanks
I have a small problem I am sure that it has an easy answer. I have created tabs using Unorderd list. My problem is I dont know how to make the tab that is clicked/or navigated to stay a certain colour.
For Example, I have Tab 1, tab 2 tab 3. The hover color is red the inactive color is blue and the active tab color is White. When click on tab 2 or three it does not deactivate tab 1 and change tab 2 to white?
I hope I made it clear. Below I have added the Tab CSS as well as the HTML code I have used.
CSS
.Tabs {
}
/* Tab navigation */
ul.primary {
border-collapse: collapse;
padding: 0 0 0 1em;
white-space: nowrap;
list-style: none;
margin: 5px;
height: auto;
line-height: normal;
border-bottom: 1px solid #bbb;
}
ul.primary li { display: inline; }
ul.primary li a {
background-color: #ddd;
border-color: #bbb;
border-width: 1px;
border-style: solid solid none solid;
height: auto;
margin-right: 0.5em;
padding: 0 1em;
text-decoration: none;
}
ul.primary li.active a {
background-color: #FFFFFF;
border: 1px solid #bbb;
border-bottom: #fff 1px solid;
}
ul.primary li a:hover {
background-color: #eee;
border-color: #ccc;
border-bottom-color: #eee;
}
HTML Code
<ul class = "Tabs primary">
<li><a href="#" onclick="MM_showHideLayers('layProducerData','','show','layProducerContacts','','hide','layProposals','','hide','layNotes','','hide')"><br />
Producer Data</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','show','layProposals','','hide','layNotes','','hide')">Producer Contacts</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','hide','layProposals','','show','layNotes','','hide')">Proposals</a></li> <li><a href="#" onclick="MM_showHideLayers('layProducerData','','hide','layProducerContacts','','hide','layProposals','','hide','layNotes','','show')">Notes </a></li></ul><br />
<br />
Thanks