-1

I don't know how to get rid of the black behind the navs. It seems to me all the css styling is not black when I review each element.

Here is a photo of my problem.

enter image description here

@charset "UTF-8";

/* CSS Document */

* {
  background-color: black;
}

body,
html {
  margin: 0;
  padding: 0;
}

video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: 1;
}

.text {
  background: rgba(0, 0, 0, 0);
  z-index: 3;
  position: relative;
  color: white;
  font-family: Helvetica;
  text-align: left;
  padding-top: 50px;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 30px;
  letter-spacing: 8px;
  text-transform: capitalize;
  padding-left: 40px;
}

.contact {
  background: rgba(0, 0, 0, 0);
  z-index: 3;
  position: relative;
  color: white;
  font-family: Helvetica;
  text-align: right;
  padding-right: 20px;
  font-weight: 200;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 20px;
  letter-spacing: 3px;
  text-transform: capitalize;
}

#nav li {
  color: white;
  position: relative;
  font-size: 22px;
  font-weight: 200;
  z-index: 2;
  font-family: helvetica;
  padding-left: 20px;
  list-style: none;
  /*border: solid;*/
  letter-spacing: 4px;
  text-align: left;
  width: 250px;
  text-decoration: underline;
  line-height: 35px;
  background: none;
  /*border-radius: 100px;*/
}

#nav li a {
  text-decoration: none;
  color: white;
}

#nav li a:hover {
  color: #c1c1c1;
}

.contact a {
  text-decoration: none;
  color: white;
}

.contact a:hover {
  color: #c1c1c1;
}
<div class="banner">
  <video poster="pic.png" autoplay="true" loop="loop" muted>
 <source src="Melanie.mp4" type="video/mp4">
 <source src="Melanie.webm" type="video/webm">
 </video>
  <div class="text">MELANIE PULLEN</div>
  <div class="contact"><a href="#">Contact</a></div>
  <div id="nav">
    <ul>
      <li><a href="#">WORK  </a></li>
      <li><a href="#">INSTALLATIONS </a></li>
      <li><a href="#">CRIME SCENES  </a></li>
      <li><a href="#">BIOGRAPHY </a></li>
      <li><a href="#">PRESS</a></li>


    </ul>
  </div>
</div>
j08691
  • 204,283
  • 31
  • 260
  • 272
mal phe
  • 13
  • 1
  • 3
  • They're black due to your code in the first 3 lines: `*{ background-color:black; }`, this makes all elemts black. Works as designed and intented. – cramopy Nov 03 '17 at 17:10

2 Answers2

4

You have this :

*{
    background-color:black;
}

This indicates that every element in the html document will have background-color:black , this includes the navs.

Remove it and see the difference.

Korio
  • 84
  • 3
0

You should be able to fix this with CSS Opacity...opacity = 0...or try setting the background image to transaparent.

https://www.w3schools.com/css/css_image_transparency.asp

tony
  • 305
  • 1
  • 3
  • 13
  • Here is another reference for you...https://www.w3schools.com/cssref/pr_background-color.asp – tony Nov 03 '17 at 17:19