I am making a website that has three tabs and I want the tabs to be displayed over the background image as a grey box with roughly 25% opacity. my problem is that i don't know how to do this & my background image will not display at all. I am very new to programming so it may just be a stupid error on my part, any help is appreciated!
jQuery(document).ready(function() {
jQuery('.tabs .tab-links a').on('click', function(e) {
var currentAttrValue = jQuery(this).attr('href');
// Show/Hide Tabs
jQuery('.tabs ' + currentAttrValue).show().siblings().hide();
// Change/remove current tab to active
jQuery(this).parent('li').addClass('active').siblings().removeClass('active');
e.preventDefault();
});
});
body{
background-image: url("Artwork/Login.jpg");
}
/*TABS INFO*/
.tabs {
width:100%;
display:inline-block;
}
/*----- Tab Links -----*/
/* Clearfix */
.tab-links:after {
display:block;
clear:both;
content:'';
}
.tab-links li {
margin:0px 5px;
float:left;
list-style:none;
}
.tab-links a {
padding:9px 15px;
display:inline-block;
border-radius:0px 0px 5px 5px;
background:#7FB5DA;
font-size:16px;
font-weight:600;
color:#4c4c4c;
transition:all linear 0.15s;
}
.tab-links a:hover {
background:#a7cce5;
text-decoration:none;
}
li.active a, li.active a:hover {
background:#fff;
color:#4c4c4c;
}
/*----- Content of Tabs -----*/
.tab-content {
padding:15px;
border-radius:3px;
box-shadow:-1px 1px 1px rgba(0,0,0,0.15);
background:#fff;
background-color: rgba(255, 255, 255, .25);
}
.tab {
display:none;
}
.tab.active {
display:block;
}
<link rel="stylesheet" type="text/css" href="css/index.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="js/tabs.js"></script>
<body>
<div class="tabs">
<ul class="tab-links">
<li class="active"><a href="#tab1">Tab 1</a></li>
<li><a href="#tab2">Tab 2</a></li>
<li><a href="#tab3">Tab 3</a></li>
</ul>
<div class="tab-content">
<div id="tab1" class="tab active">
this is a test
</div>
<div id="tab2" class="tab">
this is a test
</div>
<div id="tab3" class="tab">
this is a test
</div>
</div>
</div>
</body>
<footer>
</footer>
I have tried changing file structure, renaming, and anything else that I can think of but like I said; I am new so I'm sort of stumbling around in the dark.