Note that there are some explanatory texts on larger screens.

plurals
  1. POPositioning my main nav below my centred logo. Image included
    primarykey
    data
    text
    <p>Hi I would like to edit my css making my main nav go below my logo which will be centered.</p> <h3> It looks like this right now</h3> <p><img src="https://i.stack.imgur.com/DGN7I.png" alt="This is how it looks like right now this"></p> <h3> I want it to look like this</h3> <p><img src="https://i.stack.imgur.com/21YxR.jpg" alt="this is how I wang it to be."></p> <p>This is what my css looks like. Thank you very much for any help I can get</p> <pre><code>/* -- header layout -- */ #masthead .row { height: 100%; } #masthead .header-container { display: table; height: 100%; width: 100%; } #masthead .left-links { display: table-cell; vertical-align: middle; } #masthead .right-links { display: table-cell; vertical-align: middle; } #masthead .left-links &gt; ul { float: left; padding-top: 15px; margin-left: 15px; } #masthead .right-links &gt; ul { float: right; padding-top: 15px; } /* -- sticky header -- **/ #masthead.stuck { opacity: 0.95; position: fixed; top: -200px; left: 0; right: 0; z-index: 100; -webkit-box-shadow: 0px 1px 15px 0px rgba(0, 0, 0, 0.2); box-shadow: 0px 1px 15px 0px rgba(0, 0, 0, 0.2); } #masthead.stuck:hover { opacity: 1; } #masthead.stuck.move_down { height: 70px; top: 0; } #masthead.stuck.move_down .catalog-mode-header, #masthead.stuck.move_down .left-links &gt; ul, #masthead.stuck.move_down .right-links &gt; ul, #masthead.stuck.move_down #logo a { padding: 0 !important; } #masthead.stuck.move_down #logo a { float: none; } #masthead.stuck.move_up { top: -300px; } /* -- boxed header style --*/ .boxed #masthead { max-width: 71.25em; width: 100%; left: auto; right: auto; } .boxed #masthead.stuck { left: auto; right: auto; } /* -- centered logo -- */ .logo-center #masthead .left-links { width: 40%; } .logo-center #masthead .right-links { width: 40%; } .logo-center #masthead #logo { width: 20%; text-align: center; } .logo-center #masthead .left-links &gt; ul { margin-left: 0; } .logo-center #masthead .left-links &gt; ul &gt; li { margin-left: 0; margin-right: 20px; } /* -- navigation -- */ ul.header-nav { margin: 0; } ul.header-nav li { float: left; margin-left: 20px; list-style: none; } ul.header-nav li a { -webkit-transition: all 200ms ease-out; -moz-transition: all 200ms ease-out; transition: all 200ms ease-out; text-transform: uppercase; font-size: 80%; font-weight: bold; padding: 10px 0; } .right-links &gt; ul.header-nav { white-space: nowrap; } .right-links &gt; ul.header-nav &gt; li { display: inline-block !important; float: none; } /* -- navigation -- */ ul.header-nav { margin: 0; } ul.header-nav li { float: left; margin-left: 20px; list-style: none; } ul.header-nav li a { -webkit-transition: all 200ms ease-out; -moz-transition: all 200ms ease-out; transition: all 200ms ease-out; text-transform: uppercase; font-size: 80%; font-weight: bold; padding: 10px 0; } .right-links &gt; ul.header-nav { white-space: nowrap; } .right-links &gt; ul.header-nav &gt; li { display: inline-block !important; float: none; } </code></pre> <p>HTML </p> <pre><code> &lt;?php if($flatsome_opt['logo_position'] == 'left') : ?&gt; &lt;div id="logo" class="logo-left"&gt; &lt;a href="&lt;?php echo esc_url( home_url( '/' ) ); ?&gt;" title="&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt; - &lt;?php bloginfo( 'description' ); ?&gt;" rel="home"&gt; &lt;?php if($flatsome_opt['site_logo']){ $site_title = esc_attr( get_bloginfo( 'name', 'display' ) ); echo '&lt;img src="'.$flatsome_opt['site_logo'].'" class="header_logo" alt="'.$site_title.'"/&gt;'; } else {bloginfo( 'name' );}?&gt; &lt;/a&gt; &lt;/div&gt;&lt;!-- .logo --&gt; &lt;?php endif; ?&gt; &lt;div class="left-links"&gt; &lt;ul id="site-navigation" class="header-nav"&gt; &lt;?php if ( has_nav_menu( 'primary' ) ) : ?&gt; &lt;?php if (!isset($flatsome_opt['search_pos']) || $flatsome_opt['search_pos'] == 'left') { ?&gt; &lt;li class="search-dropdown"&gt; &lt;a href="#" class="nav-top-link icon-search"&gt;&lt;/a&gt; &lt;div class="nav-dropdown"&gt; &lt;?php get_search_form( ); ?&gt; &lt;/div&gt;&lt;!-- .nav-dropdown --&gt; &lt;/li&gt;&lt;!-- .search-dropdown --&gt; &lt;?php } ?&gt; &lt;?php wp_nav_menu(array( 'theme_location' =&gt; 'primary', 'container' =&gt; false, 'items_wrap' =&gt; '%3$s', 'depth' =&gt; 3, 'walker' =&gt; new FlatsomeNavDropdown )); ?&gt; &lt;?php if (isset($flatsome_opt['search_pos']) &amp;&amp; $flatsome_opt['search_pos'] == 'right') { ?&gt; &lt;li class="search-dropdown"&gt; &lt;a href="#" class="nav-top-link icon-search"&gt;&lt;/a&gt; &lt;div class="nav-dropdown"&gt; &lt;?php get_search_form( ); ?&gt; &lt;/div&gt;&lt;!-- .nav-dropdown --&gt; &lt;/li&gt;&lt;!-- .search-dropdown --&gt; &lt;?php } ?&gt; &lt;?php else: ?&gt; &lt;li&gt;Define your main navigation in &lt;b&gt;Apperance &gt; Menus&lt;/b&gt;&lt;/li&gt; &lt;?php endif; ?&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- .left-links --&gt; &lt;?php if($flatsome_opt['logo_position'] == 'center') { ?&gt; &lt;div id="logo"&gt; &lt;a href="&lt;?php echo esc_url( home_url( '/' ) ); ?&gt;" title="&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt; - &lt;?php bloginfo( 'description' ); ?&gt;" rel="home"&gt; &lt;?php if($flatsome_opt['site_logo']){ $site_title = esc_attr( get_bloginfo( 'name', 'display' ) ); echo '&lt;img src="'.$flatsome_opt['site_logo'].'" class="header_logo" alt="'.$site_title.'"/&gt;'; } else {bloginfo( 'name' );}?&gt; &lt;/a&gt; &lt;/div&gt;&lt;!-- .logo --&gt; &lt;?php } ?&gt; &lt;div class="right-links"&gt; &lt;?php if(!$flatsome_opt['catalog_mode']) { ?&gt; &lt;ul class="header-nav"&gt; &lt;?php if(!isset($flatsome_opt['myaccount_dropdown']) || $flatsome_opt['myaccount_dropdown']) { ?&gt; &lt;li class="account-dropdown hide-for-small"&gt; &lt;?php if ( is_user_logged_in() ) { ?&gt; &lt;a href="&lt;?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?&gt;" class="nav-top-link"&gt; &lt;?php _e('My Account', 'woocommerce'); ?&gt; &lt;/a&gt; &lt;div class="nav-dropdown"&gt; &lt;ul&gt; &lt;?php if ( has_nav_menu( 'my_account' ) ) : ?&gt; &lt;?php wp_nav_menu(array( 'theme_location' =&gt; 'my_account', 'container' =&gt; false, 'items_wrap' =&gt; '%3$s', 'depth' =&gt; 0, )); ?&gt; &lt;?php else: ?&gt; &lt;li&gt;Define your My Account dropdown menu in &lt;b&gt;Apperance &gt; Menus&lt;/b&gt;&lt;/li&gt; &lt;?php endif; ?&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- end account dropdown --&gt; &lt;?php } else { ?&gt; &lt;a href="&lt;?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?&gt;" class="nav-top-link"&gt;&lt;?php _e('Login', 'woocommerce'); ?&gt;&lt;/a&gt; &lt;?php } ?&gt; &lt;/li&gt; &lt;?php } ?&gt; &lt;!-- Show mini cart if Woocommerce is activated --&gt; &lt;?php if(in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { ?&gt; &lt;li class="mini-cart"&gt; &lt;div class="cart-inner"&gt; &lt;?php // Edit this content in inc/template-tags.php. Its gets relpaced with Ajax! ?&gt; &lt;a href="&lt;?php echo esc_url( $woocommerce-&gt;cart-&gt;get_cart_url() ); ?&gt;" class="cart-link"&gt; &lt;strong class="cart-name hide-for-small"&gt;&lt;?php _e('Cart', 'flatsome'); ?&gt;&lt;/strong&gt; &lt;span class="cart-price hide-for-small"&gt;/ &lt;?php echo $woocommerce-&gt;cart-&gt;get_cart_total(); ?&gt;&lt;/span&gt; &lt;!-- cart icon --&gt; &lt;div class="cart-icon"&gt; &lt;?php if ($flatsome_opt['custom_cart_icon']){ ?&gt; &lt;div class="custom-cart-inner"&gt; &lt;div class="custom-cart-count"&gt;&lt;?php echo $woocommerce-&gt;cart-&gt;cart_contents_count; ?&gt;&lt;/div&gt; &lt;img class="custom-cart-icon" src="&lt;?php echo $flatsome_opt['custom_cart_icon']?&gt;"/&gt; &lt;/div&gt;&lt;!-- .custom-cart-inner --&gt; &lt;?php } else { ?&gt; &lt;strong&gt;&lt;?php echo $woocommerce-&gt;cart-&gt;cart_contents_count; ?&gt;&lt;/strong&gt; &lt;span class="cart-icon-handle"&gt;&lt;/span&gt; &lt;?php }?&gt; &lt;/div&gt;&lt;!-- end cart icon --&gt; &lt;/a&gt; &lt;div class="nav-dropdown"&gt; &lt;div class="nav-dropdown-inner"&gt; &lt;!-- Add a spinner before cart ajax content is loaded --&gt; &lt;?php if ($woocommerce-&gt;cart-&gt;cart_contents_count == 0) { echo '&lt;p class="empty"&gt;'.__('No products in the cart.','woocommerce').'&lt;/p&gt;'; ?&gt; &lt;?php } else { //add a spinner ?&gt; &lt;div class="loading"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/div&gt; &lt;?php } ?&gt; &lt;/div&gt;&lt;!-- nav-dropdown-innner --&gt; &lt;/div&gt;&lt;!-- .nav-dropdown --&gt; &lt;/div&gt;&lt;!-- .cart-inner --&gt; &lt;/li&gt;&lt;!-- .mini-cart --&gt; &lt;?php } else {echo '&lt;li&gt;WooCommerce not installed!&lt;/li&gt;';} ?&gt; &lt;/ul&gt;&lt;!-- .header-nav --&gt; &lt;?php } else { ?&gt; &lt;div class="catalog-mode-header"&gt; &lt;?php echo do_shortcode($flatsome_opt['catalog_mode_header']); ?&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;/div&gt;&lt;!-- .right-links --&gt; &lt;/div&gt;&lt;!-- .large-12 --&gt; &lt;/div&gt;&lt;!-- .row --&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload