Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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.

Behavior

Auto Save

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.

HTML

              
                <h1>Pure CSS3 Nested Menu</h1>

    <table>
        <tr>
            <td colspan="2">
                <div class="menu-wrapper menu-gold">
                    <ul class="menu">
                        <li><a href=""><i class="fas fa-home"></i> Home</a></li>
                        <li>
                            <a href=""><i class="fas fa-project-diagram"></i> Project</a>
                            <ul>
                                <li><a href=""><i class="fas fa-briefcase"></i> Business Management CRM</a></li>
                                <li><a href=""><i class="fas fa-pen-nib"></i> User Interface Design</a></li>
                                <li><a href=""><i class="fas fa-database"></i> Database Managment</a></li>
                            </ul>
                        </li>
                        <li><a href=""><i class="fas fa-info-circle"></i> Portfolio</a></li>
                        <li>
                            <a href=""><i class="fas fa-building"></i> Company</a>
                            <ul>
                                <li><a href=""><i class="fab fa-amazon"></i> Amazon</a></li>
                                <li><a href=""><i class="fab fa-microsoft"></i> Microsoft</a></li>
                                <li>
                                    <a href=""><i class="fab fa-connectdevelop"></i> UI Developer</a>
                                    <ul>
                                        <li><a href=""><i class="fas fa-user"></i> Karim Khan</a></li>
                                        <li>
                                            <a href=""><i class="fas fa-user-tie"></i> Rahim Khan</a>
                                            <ul>
                                                <li><a href=""><i class="fas fa-user"></i> PHP</a></li>
                                                <li><a href=""><i class="fas fa-user-tie"></i> Mysql</a></li>
                                                <li><a href=""><i class="fas fa-user-ninja"></i> Node.js</a></li>
                                            </ul>
                                        </li>
                                        <li><a href=""><i class="fas fa-user-ninja"></i> Mahesh Jagadappa</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li><a href=""><i class="fas fa-question"></i> About Us</a></li>
                        <li><a href=""><i class="fas fa-dollar-sign"></i> Pricing</a></li>
                        <li><a href=""><i class="fas fa-phone"></i> Contact us</a></li>
                    </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="menu-wrapper menu-tomato">
                    <ul class="menu">
                        <li><a href=""><i class="fas fa-home"></i> Home</a></li>

                        <li><a href=""><i class="fas fa-info-circle"></i> Portfolio</a></li>
                        <li>
                            <a href=""><i class="fas fa-building"></i> Company</a>
                            <ul>
                                <li><a href=""><i class="fab fa-amazon"></i> Amazon</a></li>
                                <li><a href=""><i class="fab fa-microsoft"></i> Microsoft</a></li>
                                <li>
                                    <a href=""><i class="fab fa-connectdevelop"></i> UI Developer</a>
                                    <ul>
                                        <li><a href=""><i class="fas fa-user"></i> Karim Khan</a></li>
                                        <li><a href=""><i class="fas fa-user-tie"></i> Rahim Khan</a></li>
                                        <li><a href=""><i class="fas fa-user-ninja"></i> Mahesh Jagadappa</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li><a href=""><i class="fas fa-dollar-sign"></i> Pricing</a></li>
                    </ul>
                </div>
            </td>
            <td>
                <div class="menu-wrapper menu-dodgerblue">
                    <ul class="menu">
                        <li><a href=""><i class="fas fa-home"></i> Home</a></li>
                        <li>
                            <a href=""><i class="fas fa-project-diagram"></i> Project</a>
                            <ul>
                                <li><a href=""><i class="fas fa-briefcase"></i> Business Management CRM</a></li>
                                <li><a href=""><i class="fas fa-pen-nib"></i> User Interface Design</a></li>
                                <li><a href=""><i class="fas fa-database"></i> Database Managment</a></li>
                            </ul>
                        </li>
                        <li><a href=""><i class="fas fa-info-circle"></i> Portfolio</a></li>

                        <li><a href=""><i class="fas fa-question"></i> About Us</a></li>
                        <li><a href=""><i class="fas fa-phone"></i> Contact us</a></li>
                    </ul>
                </div>
            </td>
        </tr>
        <tr>

            <td>
                <div class="menu-wrapper menu-gray">
                <ul class="menu">
                    <li><a href=""><i class="fas fa-home"></i> Home</a></li>
                    <li>
                        <a href=""><i class="fas fa-project-diagram"></i> Project</a>
                        <ul>
                            <li><a href=""><i class="fas fa-briefcase"></i> Business Management CRM</a></li>
                            <li><a href=""><i class="fas fa-pen-nib"></i> User Interface Design</a></li>
                            <li><a href=""><i class="fas fa-database"></i> Database Managment</a></li>
                        </ul>
                    </li>
                    <li><a href=""><i class="fas fa-info-circle"></i> Portfolio</a></li>
                    <li>
                        <a href=""><i class="fas fa-building"></i> Company</a>
                        <ul>
                            <li><a href=""><i class="fab fa-amazon"></i> Amazon</a></li>
                            <li><a href=""><i class="fab fa-microsoft"></i> Microsoft</a></li>
                            <li>
                                <a href=""><i class="fab fa-connectdevelop"></i> UI Developer</a>
                                <ul>
                                    <li><a href=""><i class="fas fa-user"></i> Karim Khan</a></li>
                                    <li><a href=""><i class="fas fa-user-tie"></i> Rahim Khan</a></li>
                                    <li><a href=""><i class="fas fa-user-ninja"></i> Mahesh Jagadappa</a></li>
                                </ul>
                            </li>
                        </ul>
                    </li>

                </ul>
            </div>
            </td>
            <td>
                <div class="menu-wrapper menu-crimson">
                        <ul class="menu">
                            <li><a href=""><i class="fas fa-home"></i> Home</a></li>
                            <li>
                                <a href=""><i class="fas fa-project-diagram"></i> Project</a>
                                <ul>
                                    <li><a href=""><i class="fas fa-briefcase"></i> Business Management CRM</a></li>
                                    <li><a href=""><i class="fas fa-pen-nib"></i> User Interface Design</a></li>
                                    <li><a href=""><i class="fas fa-database"></i> Database Managment</a></li>
                                </ul>
                            </li>
                            <li><a href=""><i class="fas fa-info-circle"></i> Portfolio</a></li>

                            <li><a href=""><i class="fas fa-question"></i> About Us</a></li>
                            <li><a href=""><i class="fas fa-phone"></i> Contact us</a></li>
                        </ul>
                    </div>
            </td>
        </tr>
    </table>
              
            
!

CSS

              
                /* menu */
.menu-wrapper, .menu a{
    background-color: Tomato;
    width: 100%;
    color: #fff;
}

.menu::after{
    content: '';
    clear: both;
    display: block;
}

.menu a{
    display: block;
    padding: 10px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    text-decoration: none;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 14px;
}

.menu li{
    position: relative;
}

.menu > li{
    float: left;
}

.menu, .menu ul{
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.menu ul li+li{
    border-top: 1px solid #fff;
}

.menu ul{
    position: absolute;
    box-shadow:  5px 5px 10px 0 rgba(0,0,0, 0.5);
}

.menu > li ul, .menu ul ul{
    opacity: 0;
    -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in;
    z-index: -1;
    visibility: hidden;
}

.menu > li ul{
    top: 130%;
    left: 0;
}

.menu ul ul{
    left: 130%;
    top: 0;
}

.menu ul a{
    width: 250px;
}

.menu > li:hover > ul{
    top: 100%;
    opacity: 1;
    z-index: 1;
    visibility: visible;
}

.menu ul > li:hover > ul{
    left: 100%;
    opacity: 1;
    z-index: 1;
    visibility: visible;
}

/* color set */
.menu-gray, .menu-gray a{
    background-color: #CCC;
    color: #222;
}
.menu-gray a:hover{
    background-color: #BBB;
    color: #222;
}

.menu-tomato, .menu-tomato a{
    background-color: Tomato;
    color: #FFF;
}
.menu-tomato a:hover{
    background-color: #ff3c1a;
    color: #FFF;
}

.menu-dodgerblue, .menu-dodgerblue a{
    background-color: dodgerblue;
    color: #FFF;
}
.menu-dodgerblue a:hover{
    background-color: #0080ff;
    color: #FFF;
}

.menu-gold, .menu-gold a{
    background-color: gold;
    color: #000;
}
.menu-gold a:hover{
    background-color: #e6c300;
    color: #000;
}

.menu-limegreen, .menu-limegreen a{
    background-color: limegreen;
    color: #fff;
}
.menu-limegreen a:hover{
    background-color: #28a428;
    color: #fff;
}

.menu-crimson, .menu-crimson a{
    background-color: crimson;
    color: #fff;
}
.menu-crimson a:hover{
    background-color: #bb1133;
    color: #fff;
}

.menu-cadetblue, .menu-cadetblue a{
    background-color: CadetBlue;
    color: #fff;
}
.menu-cadetblue a:hover{
    background-color: #4d7e80;
    color: #fff;
}

.menu-indigo, .menu-indigo a{
    background-color: indigo;
    color: #fff;
}
.menu-indigo a:hover{
    background-color: #3b0066;
    color: #fff;
}

.menu-magenta, .menu-magenta a{
    background-color: magenta;
    color: #fff;
}
.menu-magenta a:hover{
    background-color: #cc00cc;
    color: #fff;
}

.menu-darkkhaki, .menu-darkkhaki a{
    background-color: darkkhaki;
    color: #fff;
}
.menu-darkkhaki a:hover{
    background-color: #b0a94f;
    color: #fff;
}

.menu-sandybrown, .menu-sandybrown a{
    background-color: sandybrown;
    color: #fff;
}
.menu-sandybrown a:hover{
    background-color: #f29340;
    color: #fff;
}

.menu-hotpink, .menu-hotpink a{
    background-color: hotpink;
    color: #fff;
}
.menu-hotpink a:hover{
    background-color: #ff3399;
    color: #fff;
}

/* remove this css it's only for styling the table output */
body{
    background: lighblue;
}

table{
    table-layout: fixed;
    border-spacing: 0px;
    border-collapse: collapse;
    margin-top: 3%;
    width: 100%;
}

table td{
    padding: 30px 10px;
}

h1{
    text-align: center;
    font-family: arial;
    margin-top: 20px;
}
/* ends */

              
            
!

JS

              
                
              
            
!
999px

Console