A
A
Andr2015-11-03 19:22:41
css
Andr, 2015-11-03 19:22:41

How to connect in styles?

I'm scratching my head, I don't know how to connect them. Maybe I screwed up somewhere again or did not finish writing?
37e5be3afc7e4ef3ac03502db8e8f9f5.PNG

<div class="header">
      <div id="mainmenu" >
        <ul class="menu_nav">
        <li><a href="#">Главная</a></li>
        <li><a href="#">О союзе</a></li>
        <li><a href="#">Хроника новостей</a></li>
        <li><a href="#">Ссылки</a></li>
        <li><a href="#">Фотогалерея</a></li>
      </ul>
    </div>

.header {
  height: 206px;
  width: 968px;
  background: url(../img/loo.png);
}
.header ul{
  list-style: none;

}
.header ul li{
  position: relative;
    overflow:hidden;
    height:30px;
    margin:20px 0;
   }
#mainmenu ul {
    list-style:none;
    margin:0;
    padding:120px;
    position: relative;
    left:25%;
    float:left;
    font:14px ; Myriad Pro Regular;
    font-color: black;
    height:30px;
    text-shadow:  0px 1px 2px white;
}
#mainmenu ul li {
    position:relative;
    left:-50%;
    float:left;
    margin:0px;
    height:30px
}
#mainmenu ul li a {
    display:block;
    text-decoration:none;
    padding:4px 10px 5px 5px; 
}
#mainmenu ul li a:hover {
    color:#ffffff
}
#mainmenu a {
  background: #fff;
  padding:0px;

  

}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Serov, 2015-11-04
@dashademkova

Apparently you just need to give menu-nav background: #fff

I
Ilya Alekseev, 2015-11-03
@ilyaalekseev

#mainmenu > .menu_nav > li > a by idea . And so everywhere, first the parent element then > then the child element

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question