Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                  <div class="nav green-black">
    <ul class="dropdown clear">
      <li class="sub"><a href="#">Астропрогнозы</a>
        <ul>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
        </ul>
      </li>
      <li class="sub"><a href="#">Обучение</a>
        <ul>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
        </ul>
      </li>
      <li class="sub"><a href="#">Online консультация</a>
        <ul>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
        </ul>
      </li>
      <li class="sub"><a href="#">Астрология</a>
        <ul>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
          <li><a href="" title="">Раздел</a></li>
        </ul>
      </li>
      <li><a href="#">Полезные вещи</a></li>
      <li><a href="#">Статьи</a></li>
      <li><a href="#">Контакты</a></li>
    </ul>
  </div>
              
            
!

CSS

              
                html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
.clear:before,
.clear:after {
  content: '';
  display: table
}
.clear:after {
  clear: both
}
.clear {
  zoom: 1
}
.nav {
  position: relative;
  z-index: 9000;
  margin-top:28px;
}
.nav ul,
.nav ol,
.nav dl,
.nav li {
  line-height: 1.5em;
  list-style: none;
}
.menu-icon {
  display: none;
}
ul.dropdown,
ul.dropdown li,
ul.dropdown ul {
  margin: 0;
  padding: 0;
}
ul.dropdown {
  width: 100%;
  position: relative;
  float: right;
}
ul.dropdown li {
  float: left;
  vertical-align: middle;
  zoom: 1;
  text-transform: uppercase;
  font-size: 14px;
  margin: 0 15px 0 0;
}
ul.dropdown a,
ul.dropdown span {
  display: block;
  outline: 0;
  cursor: pointer;
  padding: 0 15px 0 0;
  color: #FFB200;
}
ul.dropdown li:hover a {
  color: #fff;
  text-shadow: none;
}
ul.dropdown ul a,
ul.dropdown ul span {
  padding: 12px 15px;
}
ul.dropdown li:hover,
ul.dropdown li.hover {
  position: relative;
  cursor: pointer;
}
ul.dropdown ul {
  display: none;
  position: absolute;
  z-index: 598;
  width: 220px;
  top: 100%;
  left: 0;
  margin:0 0 0 -1px;
}

ul.dropdown li:hover > ul {
  display: block;
}
ul.dropdown ul li {
  float: none;
  font-size: 13px;
  font-weight: normal;
  text-transform: none;
  position: relative;
  color: #fff;
  margin:0;
  border: none;
  background: #262C4C;
}
ul.dropdown ul ul {
  top: 0;
  left: 100%;
}

ul.dropdown *.sub {
  padding-right: 20px;
  background-image: url(../images/ar.png);
  background-position: 92% 50%;
  background-repeat: no-repeat;
}
ul.dropdown li.sub:hover {
  background-image: url(../images/ar1.png);
  background-position: 92% 50%;
}
ul.dropdown li.sub ul li a{
  color: #fff;
}

ul.dropdown li.rtl ul {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 598;
  left: auto;
}

ul.dropdown li.rtl ul ul {
  top: 0;
  right: 100%;
  left: auto;
}

ul.dropdown li.ltr ul,
ul.dropdown li.ltr ul ul {
  top: 0;
  left: 100% !important;
  right: auto !important;
}
.green-black ul.dropdown ul {
  background: #42B3E5;
}
.green-black ul.dropdown li:hover,
.green-black ul.dropdown li.hover {
  color: #fff;
}
.green-black ul.dropdown li.active a {
  color: #fff;
}

.green-black ul.dropdown ul li {
  border-bottom: 1px solid #673F00;
}
.green-black ul.dropdown ul li.hover,
.green-black ul.dropdown ul li:hover {
  background-color: #fff;
  color: #000;
}

@media screen and (max-width:1220px) {
  .menu-icon,
  .menu-icon span,
  .menu-icon {
    color: #000;
    width: 100%;
    height: 50px;
    line-height: 40px;
    padding: 5px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    display: block;
    position: relative;
  }
  .menu-icon span {
    width: auto;
    padding: 0 25px;
    height: 43px;
    background: #000 url(../images/nav-toggle.png) no-repeat;
    background-position: 5px 2px;
    color: #fff;
    text-align: center;
    text-indent: -999em;
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 2px;
  }
  .menu-icon span:hover {
    background: #fff url(../images/nav-toggle.png) no-repeat;
    background-position: 5px -38px;
  }
  .nav {
    position: relative;
    width: 100%;
margin-top:-50px;
  }
  .nav li a{
    color: #000;
  }
  .nav,
  ul.dropdown,
  .menu-icon,
  .menu-icon span,
  ul.dropdown * {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
  }
  ul.dropdown {
    display: none;
    position: absolute;
    z-index: 9999;
    top: 72px;
    background: #fff;
    border-bottom-right-radius: 2px;
    border-bottom-left-radius: 2px;
    -webkit-box-shadow: 0px 15px 15px 0px rgba(50, 50, 50, 0.23);
    box-shadow:         0px 15px 15px 0px rgba(50, 50, 50, 0.23);
  }
  ul.dropdown li {
    position: relative;
    float: none;
    display: block;
    margin:0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  ul.dropdown li a:hover{
    background: #000;
    color: #fff;
  }
  ul.dropdown li li {
    border-top: 0;
  }
  ul.dropdown ul a {
    padding-left: 25px;
  }
  ul.dropdown ul ul a {
    padding-left: 45px
  }
  ul.dropdown ul a:hover {
    background-color: #000;
  }
  ul.dropdown *.sub {
    padding: 0 !important;
    background-image: none !important;
  }
  ul.dropdown ul {
    overflow: hidden;
    max-height: 0;
    width: auto;
    display: block;
    position: static;
    margin:0;
  }
  ul.dropdown ul.current {
    display: block;
    max-height: 100em
  }
  ul.dropdown li.sub>a {
    padding-right: 25px
  }
  ul.dropdown li.sub>a.current {
    background: #fff;
  }
  ul.dropdown li.sub>ul a.current {
    background: #fff;
  }
  ul.dropdown li.sub>a:after,
  ul.dropdown li.sub>a.current:after {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    font-size: 1.5em;
    padding: .55em .5em
  }
  ul.dropdown li.sub>a:after {
    content: '\002B'
  }
  ul.dropdown li.sub>a.current:after {
    content: "\2013";
    top: -2px
  }
  ul.dropdown li.rtl ul,
  ul.dropdown li.ltr ul,
  ul.dropdown li.ltr ul ul,
  ul.dropdown li.rtl ul ul {
    position: static
  }
  ul.dropdown li.divider {
    display: none !important;
  }
}

@media screen and (max-width:500px) {
  div.nav {
    margin-top:-48px;
  }
}

@media screen and (min-width:1222px) {
  ul.dropdown {
    display: block !important;
  }
}

              
            
!

JS

              
                
              
            
!
999px
Save your sass for CSS. Everywhere else be kind.

Console