www.webdeveloper.com
Results 1 to 2 of 2

Thread: what's wrong wih my code?

  1. #1
    Join Date
    Jul 2013
    Posts
    80

    what's wrong wih my code?

    i tried to add logo to the nav bar, but its not working. why?

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>CSS transform skew and animation</title>
    
    <style>
    html,body {
        margin:0;
        height:100%;
        background-image:linear-gradient(to bottom,rgba(0,0,0,0.2),rgba(0,0,0,1.0));
     }
    #box0,#box1,#box2,#box3 {
        position:relative;
        z-index:3;
        float:left;
    
        width:22%;
        height:100%;
        margin:-100% 1% 0 1%;
    
        background-image:url(autumn.jpg);
        background-size:100% 100%;	
        box-shadow:10px 10px 10px rgba(0,0,0,1.0),
              inset 1px  1px  1px rgba(0,0,0,1.0);
    
        -webkit-transform:skew(-10deg);
        -moz-transform:skew(-45deg);
        -ms-transform:skew(-10deg);
        -o-transform:skew(-10deg);
        transform:skew(-10deg);
    
        animation-delay:0s;
        animation-duration:1s;
        animation-name:slideDown;
        animation-fill-mode:forwards;
    
        -webkit-animation-delay:0s;
        -webkit-animation-duration:1s;
        -webkit-animation-name:slideDown;
        -webkit-animation-fill-mode:forwards;
     }
    #box1 {
        z-index:2;
        background-image:url(blood.jpg);
        animation-delay:0.5s;
        -webkit-animation-delay:0.5s;
     }
    #box2 {
       z-index:1;
       background-image:url(buddha.jpg);
       animation-delay:1s;
       -webkit-animation-delay:1s;
     }
    #box3 {
        z-index:0;
        background-image:url(avenue.jpg);
        animation-delay:1.5s;
        -webkit-animation-delay:1.5s;
     }
    
    #nav {
        position:absolute;
        z-index:4;
    
        width:100%;
        padding:0;
        margin:0;
        border-top:1px solid rgb(0,0,0);
        border-bottom:1px solid rgb(0,0,0);
        bottom:10%;
    
        list-style-type:none;
        line-height:100px;
        text-align:center;
        background-color:rgb(247,247,247);
        box-shadow:0 0 30px rgba(0,0,0,0.8),
             inset 0 0 30px rgba(0,0,0,0.8);
        opacity:0;
    
        animation-delay:2.5s;
        animation-duration:2.0s;
        animation-name:show;
        animation-fill-mode:forwards;
    
        -webkit-animation-delay:2.5s;
        -webkit-animation-duration:2.0s;
        -webkit-animation-name:show;
        -webkit-animation-fill-mode:forwards;
     }
    #nav li { 
        display:inline;
        margin:0 20px;
     }
     
    .logo {
    	background-image:url(images/vensta_logo.jpg);
    }
    
    #nav a {
        color:rgb(0,0,0); 
        text-transform:uppercase;
        text-decoration:none;
     }
    @keyframes slideDown{
        from {margin-top:-100%;}
        to   {margin-top:0;}
     }
    @-webkit-keyframes slideDown {
        from {margin-top:-100%;}
        to   {margin-top:0;}
     }
    
    @keyframes show {
        from {opacity:0}
        to   {opacity:1;}
     }
    @-webkit-keyframes show {
        from {opacity:0}
        to   {opacity:1;}
     }
    </style>
    
    </head>
    
    <body>
    
    <div id="box0"></div>
    <div id="box1"></div>
    <div id="box2"></div>
    <div id="box3"></div>
    
    <ul id="nav">
     <li><a href="#"><span class='logo'>One</span></a></li>
     <li><a href="#">ABOUT </a></li>
     <li><a href="#">PROPERTY DEVELOPMENT</a></li>
     <li><a href="#">CONTACT US</a></li>
    </ul>
    
    </body>
    </html>

  2. #2
    Join Date
    Sep 2013
    Posts
    221
    modified part in CSS:

    #nav ul li.active a {
    color:#87CEFF;
    }
    #nav ul ul li {
    left:auto;
    margin:0;
    clear:left;
    float:left;
    width:100%;
    background: #FFFFFF;
    background: linear-gradient(top, #FFFFFF 0%, #87CEFF 50%);
    background: -moz-linear-gradient(top, #FFFFFF 0%, #87CEFF 50%);
    background: -webkit-linear-gradient(top, #FFFFFF 0%,#87CEFF 50%);
    background-color:#87CEFF;
    }

    or you can add these styles it should work:

    #navbar li {position: relative;}

    #navbar li ul {position: absolute; left: -9999px; display: block;}

    #navbar li:hover ul {left: 0;}

    Hope this helps.
    strad solutionswww.stradsolutions.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.25572 seconds
  • Memory Usage 2,850KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (2)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates