I want to know if there is any way I could insert an HTML codes into all the other pages of the website without loosing the CSS design of the file. I've tried using but it's too messy. I want to know if there is an easier way to insert the HTML file into all other files.
The file I'm trying to load in the pages is an HTML for a menu tab.
Code:
<nav id="tab">
<ul>
<li><a href="index.html" id="tabb">HOME</a></li>
<li><a href="codes/index.html" id="tabb">CODES</a>
<ul id="codeul">
<li><a href="codes/mirc_downloads/index.html" id="tabb">mIRC</a></li>
<li><a href="codes/batch_downloads/index.html" id="tabb">BATCH</a></li>
<li><a href="codes/samp_downloads/index.html" id="tabb">SA-MP</a></li>
</ul>
</li>
<li><a href="gallery" id="tabb">GALLERY</a></li>
<li><a href="#" id="tabb">CONTACT</a>
<ul id="contul">
<li><a href="http://facebook.com/areeb12/" id="tabb">Facebook</a></li>
<li><a href="http://twitter.com/AreebBeigh/" id="tabb">Twitter</a></li>
<li><a href="https://plus.google.com/u/0/107540768248951141539" id="tabb">Google</a></li>
<li><a href="http://instagram.com/areebbeigh" id="tabb">Instagram</a></li>
</li>
</ul>
</ul>
<div id="clear"></div>
</nav>
CSS
/* Nav tab */
#tab {
background-color: #000;
padding: 1px 50px;
opacity: 0.7;
position: relative;
top: 65px;
margin-top: -64px;
//float: right;
//border-bottom: 1px solid grey;
}
#tab ul li a {
padding: 15px 14px;
text-decoration: none;
font-weight: bold;
font-size: 24px;
background-color: black;
border-right: 1px solid white;
border-left: 1px solid white;
color: white;
}
#tab ul li a:hover {
padding: 15px 14px;
text-decoration: none;
font-weight: bold;
font-size: 24px;
background-color: #33333;
//opacity: 1;
color: white;
}
#tab ul li ul a {
padding: 10px;
display: block;
background-color: #333333;
}
#tab ul li ul a:hover {
padding: 10px;
display: block;
background-color: #666666;
}
#tab ul li ul {
background-color: #333333;
}
/* Contact drop down edits */
#contul {
width: 126px;
}
/* Codes drop down edits */
#codeul {
width: 97px;
}
#tab ul li {
display: inline;
position: relative;
}
/* Drop down menu */
#tab ul ul {
display: none;
position: absolute;
left: 0px;
background-color: white;
}
/* Trigger for drop down menu */
#tab ul li:hover ul{
display: block;
transition: 0.3s;
}
#clear {
clear:both;
}
If any further info is needed, here's the website: www.areeb-beigh.tk
The tab is only on the index.html page as I don't want to copy and paste that long HTML into every single page.. and moreover editing the same would be like a hell lotta work.
I'm just a beginner so please keep it simple :)! Any help would be appreciated.
Thanks in advance :)!
Regards -Areeb