hi this will be not working i have solved the issue
hi this will be not working i have solved the issue
Above is not supported by IE 8 and earlier.
If you also want to support the IE 8 and earlier, you have to give each tab another class and define the background for each of those classes:
HTML:Please try if that helps.
Try using this code as an example and add some css.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial;}
/* Style the tab */
.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons inside the tab */
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
}
/* Change background color of buttons on hover */
.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
.tab button.active {
background-color: #ccc;
}
/* Style the tab content */
.tabcontent {
display: none;
padding: 6px 12px;
border: 1px solid #ccc;
border-top: none;
}
</style>
</head>
<body>
<h2>Tabs</h2>
<p>Click on the buttons inside the tabbed menu:</p>
<div class="tab">
<button class="tablinks" onclick="openCity(event, 'London')">London</button>
<button class="tablinks" onclick="openCity(event, 'Paris')">Paris</button>
<button class="tablinks" onclick="openCity(event, 'Tokyo')">Tokyo</button>
</div>
<div id="London" class="tabcontent">
<h3>London</h3>
<p>London is the capital city of England.</p>
</div>
<div id="Paris" class="tabcontent">
<h3>Paris</h3>
<p>Paris is the capital of France.</p>
</div>
<div id="Tokyo" class="tabcontent">
<h3>Tokyo</h3>
<p>Tokyo is the capital of Japan.</p>
</div>
<script>
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
</body>
</html>
72.24.224.219<div style="width: 1000px; margin:0 auto; padding: 0px 0 0px;"> <ul class="tabs" data-persist="true"> <li><a href="#view1" class="tab1"><b>tab 1</b></a></li> <li><a href="#view2" class="tab2"><b>tab 2</b></a></li> <li><a href="#view3" class="tab3"><b>tab 3</b></a></li> </ul> <div class="tabcontents1" id="sub1"> <div id="view1"> <p> tab 1 text </p> </div> </div> <div class="tabcontents1" id="sub2"> <div id="view2"> <p> tab 2 text </P> </div> </div> <div class="tabcontents1" id="sub3"> <div id="view3"> <p> tab 3 text </p> </div> </div> </div>
If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;
If your question is related to the Tabbed Content, click:
Ask new question: Tabbed ContentOtherwise navigate to one of the following forum categories, and post your question there.
##