Thursday, 21 February 2013

CSS Lava Lamp Menu For Blogger

Important: All scripts hosted on widcraft.googlecode.com don't work anymore because Google has blocked that SVN repository.

Yesterday, I found this excellent CSS menu, which bases on "Lava Lamp Menu" concept. Also, this menu is available for download or demo at this link. In September, we shared a jquey based Lava Lamp menu, which was based on jQuery.

This menu is available in three different styles, you can check a demo at this link. This menu is created by Paulina Hetman from Pepsized. This menu is coded so beautiful, and basic mark-up of all three menus are same.

First two menus are pure CSS based and third menu uses a heart and arrow image, which is adorable (Just kidding :p).

Add This Menu To Blogger:

  • Go To Blogger > Template > Edit HTML > Click on "Proceed."
  • Search for ]]></b:skin> and post following css just above it:

/* --- for all three examples ----*/

.nav {
  text-align: center;
  overflow: hidden;
  margin: 2em auto;
  width: 480px;
  position: relative; }
  .nav a {
    display: block;
    position: relative;
        float: left;
        padding: 1em 0 2em;
    width: 25%;
        text-decoration: none;
      color: #393939;
      -webkit-transition: .7s;
      -moz-transition: .7s;
      -o-transition: .7s;
      -ms-transition: .7s;
      transition: .7s; }
      .nav a:hover {
        color: #c6342e; }

.effect {
    position: absolute;
  left: -12.5%;
  -webkit-transition: 0.7s ease-in-out;
  -moz-transition: 0.7s ease-in-out;
  -o-transition: 0.7s ease-in-out;
  -ms-transition: 0.7s ease-in-out;
  transition: 0.7s ease-in-out; }

    .nav a:nth-child(1):hover ~ .effect {
      left: 12.5%; }
    .nav a:nth-child(2):hover ~ .effect {
      left: 37.5%; }
    .nav a:nth-child(3):hover ~ .effect {
      left: 62.5%; }
    .nav a:nth-child(4):hover ~ .effect {
      left: 87.5%; }

/* ----- line example -----*/

.ph-line-nav .effect {
  width: 90px;
  height: 2px;
  bottom: 36px;
  background: #c6342e;
  box-shadow: 0 1px 0 white;
  margin-left:-45px;
}

/* ----- dot example -----*/

.ph-dot-nav:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 1px;
  background: #c6342e;
  bottom: 40px; }
.ph-dot-nav a:after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  bottom: 38px;
  left: 50%;
  margin-left: -2px;
  background: #c6342e;
  border-radius: 100%; }
.ph-dot-nav .effect {
  width: 10px;
  height: 10px;
  bottom: 36px;
    margin-left: -5px;
  background: #c6342e;
  border-radius: 100%; }

/* ----- heart example -----*/

.ph-heart-nav .effect, .ph-heart-nav a:after, .ph-heart-nav a:before {
  background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgypDTU3dQfrADAzdL1jBL-uasgRdoGOi8eoCaWdzAADif6IQ-eV4TxdQkUrE-xWutf4PC_xhsvK0WJBM2iyhTF9qCc1TisIceohG_um9HLBf8vFFoJGvaXH0_Wv-gKHEBIFreWGSlEncg/s1600/heart.png') no-repeat; }
.ph-heart-nav .effect {
  position: absolute;
  bottom: 26px;
  background-position: 0 0;
  height: 8px;
  width: 62px;
  margin-left:-31px; }

.ph-heart-nav a:before {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 20px;
  background-position: -62px 0;
  height: 20px;
  width: 11px;
  margin-left: -11px; }

.ph-heart-nav a:after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 1;
  background-position: -73px 0;
  height: 20px;
  width: 11px; }

  • Save Template....All done with template editing. Now, it's time to edit you layout.
  • Go To Blogger > Layout > Add A Widget > HTML/JavaScript
  • Paste any of the following code:

First Style:

    <div class="ph-line-nav nav">
        <a href="#">Home</a>
        <a href="#">About</a>
        <a href="#">Gallery</a>
        <a href="#">Contact</a>
        <div class="effect"></div>
    </div>

Second Style:

    <div class="ph-dot-nav nav">
        <a href="#">Home</a>
        <a href="#">About</a>
        <a href="#">Gallery</a>
        <a href="#">Contact</a>
        <div class="effect"></div>
    </div>

Third Style:

    <div class="ph-heart-nav nav">
        <a href="#">Home</a>
        <a href="#">About</a>
        <a href="#">Gallery</a>
        <a href="#">Contact</a>
        <div class="effect"></div>
    </div>

  • Save your widget. Now visit your blog and see the css magic.... :)

Don't forget to leave your valuable comments.....:)
Important: Check our new website TricksPanda.com for WordPress tutorials, plugins and more.
 
Powered by Blogger.