Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WP Twenty Fourteen

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #173185
    darklord98703
    Participant

    Hi,

    I write here because I got an Issue with the default WP theme, it’s basic.

    I’ve disable the left orientation of the theme and center it, but Id like the Footer and Nav Menu (Header) to be full wide, I can’t get it Right done, also I got another Issue with the search bar, I coded my own search bar but I couldn’t make it to be at the center of the Nav Menu, it’s right now at the right side and the menu is next to it on the left, I’d Like the menu Buttons to be at the right side, and the search bar at the middle (Logo – Search bar – Menu).

    I leave the CSS and PHP code of the Search bar:

    PHP:

    function add_search_to_wp_menu ( $items, $args ) {
    if( ‘primary’ === $args -> theme_location ) {
    $items .= ‘<li class=”menu-item menu-item-search”>’;
    $items .= ‘<form method=”get” class=”menu-search-form” action=”‘ . get_bloginfo(‘home’) . ‘/”>

    <input class=”text_input” type=”text” value=”” name=”s” id=”s” onfocus=”if (this.value == \’\’) {this.value = \’\’;}” onblur=”if (this.value == \’\’) {this.value = \’\’;}” /><input type=”submit” class=”my-wp-search” id=”searchsubmit” value=”search” />

    </form>’;
    $items .= ‘‘;
    }
    return $items;
    }
    add_filter(‘wp_nav_menu_items’,’add_search_to_wp_menu’,10,2);

    CSS:

    .menu-search-form input#searchsubmit.my-wp-search {
    display: none;
    }
    .menu-search-form input#s.text_input {

    border-radius: 0px; 
    width: 450px; 
    margin-right: 15px; 
    margin-left: 10px;
    font-size: 12px;
    
    -webkit-transition: all 0.30s ease-in-out;
    -moz-transition: all 0.30s ease-in-out;
    -ms-transition: all 0.30s ease-in-out;
    -o-transition: all 0.30s ease-in-out;
    outline: none;
    border: 1px solid #DDDDDD;
    

    }

    .menu-search-form input#s.text_input:focus, textarea:focus {
    box-shadow: 0 0 5px #b2d3fb;
    border: 2px solid #b2d3fb;
    }

    Thanks for the Help.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.