The hover for my buttons and links won’t work

Ryan Buck

I’m creating this website and I made this nav bar. It had dummy links in the anchor tags and I had a hover property on my buttons. All of this was working properly. I had made a few changes to the code and now none of it works. I cannot figure out where I went wrong. I was editing properties and things just stopped working.

* {
  margin: 0 auto;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: "Arial";
  color: white;
}

html,
body {
  margin: 0 auto;
  background-color: black;
  max-width: 940px;
  min-height: 100%;
}

.wrapper {
  margin: 0 auto;
  width: 92%;
  background-image: url("images/backgrounds/wood.jpg");
}

/*********************************************************************************************************************************************
    HEADER STYLING
    *********************************************************************************************************************************************/

.header {
  position: relative;
  height: 100px;
  background-color: #111111;
}

.header h1 {
  position: relative;
  margin: 0;
  height: 20px;
  text-align: center;
  font-size: 2.3em;
  top: 25%;
}

.header p {
  position: relative;
  top: 25%;
  width: 100%;
  font-size: 1em;
  text-align: center;
}

/*********************************************************************************************************************************************
    NAVIGATION BAR STYLING
    *********************************************************************************************************************************************/

nav {
  height: 40px;
}

nav ul {}

nav ul li {
  background-color: #111111;
  text-align: center;
  list-style-type: none;
  width: 25%;
  float: left;
  /*margin: 0 1%;
  border-radius: 10px;
  box-shadow: 5px 5px 5px #000;*/
}

nav ul li a {
  text-decoration: none;
  line-height: 40px;
  display: block;
}

nav ul li a:hover {
  background-color: #222222;
}

/*********************************************************************************************************************************************
    JUMBOTRON STYLING
    *********************************************************************************************************************************************/

.jumbotron {
  position: relative;
  background-image: url(images/jumbotron/studiopic.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  max-height: 53%;
}

.jumbotext h1 {
  display: inline-block;
  position: absolute;
  bottom: 0px;
  text-align: right;
}

/*********************************************************************************************************************************************
    FOOTER STYLING
    *********************************************************************************************************************************************/

.footer {
  height: 100px;
  width: 100%;
  background-color: #111111;
}
<!DOCTYPE html>
<html>

<head>
  <title>CM Sound | Home</title>
  <meta charset="UTF-8">
  <meta name="description" content="CM Sound's studio webpage">
  <meta name="author" content="Ryan Buck | May 2015">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
  <div class="wrapper">
    <div class="header">
      <h1>CM Sound</h1><br/>
      <p>Create with us</p>
    </div>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Audio</a></li>
        <li><a href="#">Pricing</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </nav>
    <div class="jumbotron">
      <div class="jumbotext">
      </div>
    </div>
    <div class="footer">

    </div>
  </div>
</body>


</html>

Rushi Jagani
nav {
height: 40px;
position: relative;
}

just add the position relative to nav

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Why don't any of my facebook share buttons work?

분류에서Dev

My update queries won't work

분류에서Dev

Lightbox won't work when my site css page is linked

분류에서Dev

Additionally filter buttons won´t update the URL hash (see my JSFIDDLE)

분류에서Dev

RequestContext won't work

분류에서Dev

My ListView won't work ...it says: "Unfortunately your app has stopped"

분류에서Dev

AJAXify won't work on phpBB?

분류에서Dev

Program won't work in FireFox

분류에서Dev

Fade in Function Won't Work

분류에서Dev

I'm trying to get jquery working in the background.js of my chrome extension and it won't work. why?

분류에서Dev

Links jump to top and bottom but smooth scrolling doesn't work

분류에서Dev

Why can't Excel update some of the links in my workbook

분류에서Dev

Share button- hover & Googleplus/Facebook links

분류에서Dev

All buttons hover styling in Twitter Bootstrap

분류에서Dev

Several pages won't show up with SEO links enabled in Opencart

분류에서Dev

Why won't this regexp in htaccess work properly?

분류에서Dev

Alsamixer won't work with bluetooth device

분류에서Dev

Post variables with ajax won't work

분류에서Dev

Simple class won't work in C++

분류에서Dev

Laravel named routes won't work on wampserver

분류에서Dev

Why won't the routing work in this code?

분류에서Dev

Now visudo won't work at all

분류에서Dev

Why won't this MySQL stored procedure work?

분류에서Dev

For /F "skip=0" won't work as expected

분류에서Dev

Why doesn't my SetLength work?

분류에서Dev

My validation doesn't work for textarea

분류에서Dev

My button used to work -- but now it doesn't

분류에서Dev

`__call` doesn't work in my Lua code

분류에서Dev

my form doesen't work right