I'm trying to center the search bar in the middle of the header in my WordPress website.
However, since I'm using a ready-made theme (Flatsome), the classes has already been made which make it more difficult to customize.
The problem is that the elements of the header use the same classes, which mean if i target one element another part get affected as well.
The website is here: toolstrading.se
I have been working with this code below.
.nav-uppercase {
text-align: center;
float: none;
display: inline-block;
margin-left: -30px;
}
As you can see, the elements on the right get affected by the CSS change
Appreciate all help I can get, since I'm getting crazy by this.
Thank you!
Edit
Here is the whole header block.
<header id="header" class="header has-sticky sticky-jump">
<div class="header-wrapper">
<div id="masthead" class="header-main nav-dark">
<div class="header-inner flex-row container logo-left medium-logo-center" role="navigation">
<!-- Logo -->
<div id="logo" class="flex-col logo">
<!-- Header logo -->
<a href="https://toolstrading.se/" title="Scandinavian Tools - Din helhetsleverantör av verktyg" rel="home">
<img width="162" height="100" src="https://toolstrading.se/wp-content/uploads/toolstrading-1-2-1-6.png" class="header_logo header-logo" alt="Scandinavian Tools"><img width="162" height="100" src="https://toolstrading.se/wp-content/uploads/toolstrading-1-2-1-6.png" class="header-logo-dark" alt="Scandinavian Tools"></a>
</div>
<!-- Mobile Left Elements -->
<div class="flex-col show-for-medium flex-left">
<ul class="mobile-nav nav nav-left ">
<li class="nav-icon has-icon">
<a href="#" data-open="#main-menu" data-pos="right" data-bg="main-menu-overlay" data-color="" class="is-small" aria-label="Menu" aria-controls="main-menu" aria-expanded="false">
<i class="icon-menu"></i>
</a>
</li> </ul>
</div>
<!-- Left Elements -->
<div class="flex-col hide-for-medium flex-left
flex-grow">
<ul class="header-nav header-nav-main nav nav-left nav-uppercase">
<li class="header-search-form search-form html relative has-icon">
<div class="header-search-form-wrapper">
<div class="searchform-wrapper ux-search-box relative form-flat is-normal"><form role="search" method="get" class="searchform" action="https://toolstrading.se/">
<div class="flex-row relative">
<div class="flex-col flex-grow">
<label class="screen-reader-text" for="woocommerce-product-search-field-0">Sök efter:</label>
<input type="search" id="woocommerce-product-search-field-0" class="search-field mb-0" placeholder="Sök i vårt enorma sortiment" value="" name="s" autocomplete="off">
<input type="hidden" name="post_type" value="product">
</div>
<div class="flex-col">
<button type="submit" value="Sök" class="ux-search-submit submit-button secondary button icon mb-0" aria-label="Submit">
<i class="icon-search"></i> </button>
</div>
</div>
<div class="live-search-results text-left z-top"><div class="autocomplete-suggestions" style="position: absolute; display: none; max-height: 300px; z-index: 9999;"></div></div>
</form>
</div> </div>
</li> </ul>
</div>
<!-- Right Elements -->
<div class="flex-col hide-for-medium flex-right">
<ul class="header-nav header-nav-main nav nav-right nav-uppercase">
<li class="account-item has-icon
has-dropdown">
<a href="https://toolstrading.se/my-account/" class="account-link account-login
" title="Mitt konto">
<span class="header-account-title">
Admin </span>
</a>
<ul class="nav-dropdown nav-dropdown-default">
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--dashboard is-active active">
Kontopanel
<!-- empty -->
</li>
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--orders">
Beställningar
</li>
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--downloads">
Nedladdningar
</li>
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--edit-address">
Adresser
</li>
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--edit-account">
Kontouppgifter
</li>
<li class="woocommerce-MyAccount-navigation-link woocommerce-MyAccount-navigation-link--customer-logout">
Logga ut
</li>
</ul>
</li>
<li class="header-divider"></li><li class="cart-item has-icon has-dropdown">
<a href="https://toolstrading.se/cart/" title="Varukorg" class="header-cart-link is-small">
<span class="header-cart-title">
<span class="cart-price"><span class="woocommerce-Price-amount amount"><bdi>30.00<span class="woocommerce-Price-currencySymbol">kr</span></bdi></span></span>
</span>
<span class="cart-icon image-icon">
<strong>1</strong>
</span>
</a>
<ul class="nav-dropdown nav-dropdown-default">
<li class="html widget_shopping_cart">
<div class="widget_shopping_cart_content">
<ul class="woocommerce-mini-cart cart_list product_list_widget ">
<li class="woocommerce-mini-cart-item mini_cart_item">
× <a href="https://toolstrading.se/product/handduk-300-x-300-mm800-gr-for-mikrofiberbiltvatt-for-biltvatt-utrustning-sin-ss-wt6/">
<img width="300" height="300" src="https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-300x300.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" srcset="https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-300x300.jpg 300w, https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-150x150.jpg 150w, https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-100x100.jpg 100w" sizes="(max-width: 300px) 100vw, 300px">Handduk 300 x 300 mm800 gr för mikrofiberbiltvätt för biltvätt utrustning# SIN-SS-WT6 </a>
<span class="quantity">1 × <span class="woocommerce-Price-amount amount"><bdi>30.00<span class="woocommerce-Price-currencySymbol">kr</span></bdi></span></span> </li>
</ul>
<p class="woocommerce-mini-cart__total total">
<strong>Delsumma:</strong> <span class="woocommerce-Price-amount amount"><bdi>30.00<span class="woocommerce-Price-currencySymbol">kr</span></bdi></span> </p>
<p class="woocommerce-mini-cart__buttons buttons">Visa varukorgTill kassan</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
<!-- Mobile Right Elements -->
<div class="flex-col show-for-medium flex-right">
<ul class="mobile-nav nav nav-right ">
<li class="cart-item has-icon">
<a href="https://toolstrading.se/cart/" class="header-cart-link off-canvas-toggle nav-top-link is-small" data-open="#cart-popup" data-class="off-canvas-cart" title="Varukorg" data-pos="right">
<span class="cart-icon image-icon">
<strong>1</strong>
</span>
</a>
<!-- Cart Sidebar Popup -->
<div id="cart-popup" class="mfp-hide widget_shopping_cart">
<div class="cart-popup-inner inner-padding">
<div class="cart-popup-title text-center">
<h4 class="uppercase">Varukorg</h4>
<div class="is-divider"></div>
</div>
<div class="widget_shopping_cart_content">
<ul class="woocommerce-mini-cart cart_list product_list_widget ">
<li class="woocommerce-mini-cart-item mini_cart_item">
× <a href="https://toolstrading.se/product/handduk-300-x-300-mm800-gr-for-mikrofiberbiltvatt-for-biltvatt-utrustning-sin-ss-wt6/">
<img width="300" height="300" src="https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-300x300.jpg" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" srcset="https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-300x300.jpg 300w, https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-150x150.jpg 150w, https://toolstrading.se/wp-content/uploads/SIN-SS-WT6-100x100.jpg 100w" sizes="(max-width: 300px) 100vw, 300px">Handduk 300 x 300 mm800 gr för mikrofiberbiltvätt för biltvätt utrustning# SIN-SS-WT6 </a>
<span class="quantity">1 × <span class="woocommerce-Price-amount amount"><bdi>30.00<span class="woocommerce-Price-currencySymbol">kr</span></bdi></span></span> </li>
</ul>
<p class="woocommerce-mini-cart__total total">
<strong>Delsumma:</strong> <span class="woocommerce-Price-amount amount"><bdi>30.00<span class="woocommerce-Price-currencySymbol">kr</span></bdi></span> </p>
<p class="woocommerce-mini-cart__buttons buttons">Visa varukorgTill kassan</p>
</div>
<div class="cart-sidebar-content relative"></div> </div>
</div>
</li>
</ul>
</div>
</div>
<div class="container"><div class="top-divider full-width"></div></div>
</div><div id="wide-nav" class="header-bottom wide-nav nav-dark flex-has-center">
<div class="flex-row container">
<div class="flex-col hide-for-medium flex-left">
<ul class="nav header-nav header-bottom-nav nav-left nav-size-medium nav-spacing-xlarge">
<li id="menu-item-30" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-28 current_page_item menu-item-30 active menu-item-design-default">Hem</li>
<li id="menu-item-66" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-66 menu-item-design-default">Webbshop</li>
<li id="menu-item-48410" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-48410 menu-item-design-default">Erbjudanden</li>
<li id="menu-item-64" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-64 menu-item-design-default">Leasing</li>
</ul>
</div>
<div class="flex-col hide-for-medium flex-center">
<ul class="nav header-nav header-bottom-nav nav-center nav-size-medium nav-spacing-xlarge">
</ul>
</div>
<div class="flex-col hide-for-medium flex-right flex-grow">
<ul class="nav header-nav header-bottom-nav nav-right nav-size-medium nav-spacing-xlarge">
<li class="html header-button-1">
<div class="header-button">
<a href="http://partytent.se" class="button secondary" style="border-radius:99px;">
<span>Letar du efter tält och tillbehör?</span>
</a>
</div>
</li>
</ul>
</div>
<div class="flex-col show-for-medium flex-grow">
<ul class="nav header-bottom-nav nav-center mobile-nav nav-size-medium nav-spacing-xlarge">
<li class="header-search-form search-form html relative has-icon">
<div class="header-search-form-wrapper">
<div class="searchform-wrapper ux-search-box relative form-flat is-normal"><form role="search" method="get" class="searchform" action="https://toolstrading.se/">
<div class="flex-row relative">
<div class="flex-col flex-grow">
<label class="screen-reader-text" for="woocommerce-product-search-field-1">Sök efter:</label>
<input type="search" id="woocommerce-product-search-field-1" class="search-field mb-0" placeholder="Sök i vårt enorma sortiment" value="" name="s" autocomplete="off">
<input type="hidden" name="post_type" value="product">
</div>
<div class="flex-col">
<button type="submit" value="Sök" class="ux-search-submit submit-button secondary button icon mb-0" aria-label="Submit">
<i class="icon-search"></i> </button>
</div>
</div>
<div class="live-search-results text-left z-top"><div class="autocomplete-suggestions" style="position: absolute; display: none; max-height: 300px; z-index: 9999;"></div></div>
</form>
</div> </div>
</li> </ul>
</div>
</div>
</div>
<div class="header-bg-container fill"><div class="header-bg-image fill"></div><div class="header-bg-color fill"></div></div> </div>
</header>
Add this styling
.header-nav.header-nav-main.nav.nav-left.nav-uppercase {
justify-content: center;
}
I checked the HTML structure of your site with the url you provided.
With the Chrome Dev Tools I inspected to find which element was the main container for your search bar.
This element is your main container and it is responsible for the centering:
<ul class="header-nav header-nav-main nav nav-left nav-uppercase">
Notice the class "nav-left"? ...Change it to the class "nav-center".
<ul class="header-nav header-nav-main nav nav-center nav-uppercase">
This will center your search like that:
https://i.imgur.com/DsyIMlX.png
You might need a Wordpress Child Theme to add custom CSS that does not get erased when you update your Wordpress version. And your CSS inside the Child Theme could target that main element.
#header ul.header-nav-main {
justify-content: center !important;
}
The !important is a specificity maximum level to be 100% sure that nothing else will bypass your rule. Sometimes Wordpress has a lot of different CSS in many different files. If you can avoid the !important keyword it's even better.
Related
after creating products using flexbox items, the footer which has a google map location and communication details, it is coming over the flexbox items having product images. I have tried using various solutions like:
1.Giving footer - margin-top:100% or 1000px; working, but issue comes back in Mobile mode.
2.creating display: flex column for all the items inside the body, using nav, main and footer tags(that code is not given here) and giving hem appropriate growth, shrink and basis values. it too didn't work.
reading various solutions from StackOverflow made it clear that using Grid is an effective solution.
I tried this code and it didn't work too. Please giver a feasible solution. Thanks in advance.
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<title>SathaJeevana Ayur Foods</title>
<link rel="shortcut icon" href="C:\Users\Durga siva prasad\Desktop\sathajeevana\images\logo.png" type="image/png" >
<style>
.break {
flex-basis: 100%;
height: 0;
}
html,body{
height: 100%;
}
body{
margin: 0;
}
body {
display: grid;
grid-gap: 10px;
height: 100%;
grid-template-columns:1fr;
grid-template-areas:
"nav"
"main"
"footer";
grid-template-rows: 100px 1fr 80px;
}
nav {
grid-area: nav;
}
main {
grid-area: main;
}
footer {
grid-area: footer;
}
</style>
</head>
<body >
<a class="navbar-brand"><img src="C:\Users\Durga siva prasad\Desktop\sathajeevana\images\logo.png" type="image/png" height="70" width = "100" ></a>
<div class="collapse navbar-collapse d-flex flex-wrap align-items-center" id="nav">
<ul class="navbar-nav mr-auto">
<li class="nav-item" >
<a class="nav-link font-weight-bold px-3" style="color: #008000" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link font-weight-bold px-3" style="color: #008000" href="#">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link font-weight-bold px-3" style="color: #008000" href="#">Team</a>
</li>
<li class="nav-item">
<a class="nav-link font-weight-bold px-3" style="color: #008000" href="#">Contact Us</a>
</li>
<li class="nav-item dropdown active" data-toggle="dropdown">
<a class="nav-link font-weight-bold px-3 dropdown-toggle" style="color: #008000" href="#">Products</a>
<div class="dropdown-menu">
<a class="dropdown-item font-weight-bold" style="color: #008000" href="prodcol.html/#foodproducts" target="_self">Food Products</a>
<a class="dropdown-item font-weight-bold" style="color: #008000" href="prodcol.html/#oilproducts" target="_self">Oil Products</a>
</div>
</li>
</ul>
</div>
<main>
<a name="foodproducts"></a>
<div class="d-flex justify-content-around align-items-center flex-wrap" style="height: 500px;">
<div class="p-4 m-2 border border-success ">
<a href="#">
<img src="C:\Users\Durga siva prasad\Downloads\product and ingredients\SaltF.jpg" height="300" width = "200" >
<p class="font-weight-bold text-center" style="color: #008000" >Ayur 2 Salt</p>
</a>
<div class="text-center">
<span><b>₹ 50</b></span><br>
<span>Quantity: 1/2 kg<span><br><br>
<button type="button" class="btn btn-primary">Add to Cart</button>
</div>
</div>
<div class=" p-4 m-2 border border-success ">
<a href="#">
<img src="C:\Users\Durga siva prasad\Downloads\product and ingredients\MilletsF.jpg" height="300" width = "200">
<p class="font-weight-bold text-center" style="color: #008000">Ayur Millet Rice</p>
</a>
<div class="text-center">
<span><b>₹ 50</b></span><br>
<span>Quantity: 1/2 kg<span><br><br>
<button type="button" class="btn btn-primary">Add to Cart</button>
</div>
</div>
<div class="break"></div>
<div class="p-4 m-2 border border-success ">
<a href="#">
<img src="C:\Users\Durga siva prasad\Downloads\product and ingredients\Oil.jpg" height="300" width = "700">
<p class="font-weight-bold text-center" style="color: #008000" >Cooking Oil</p>
</a>
<div class="text-center">
<span><b>₹ 50</b></span><br>
<span>Quantity: 1/2 kg<span><br><br>
<button type="button" class="btn btn-primary">Add to Cart</button>
</div>
</div>
<div class="break"></div>
<div>
</main>
<footer id="footer">
<div class="row">
<div class="col-sm-8" id="map" style="height:400px; background:gray;"></div>
<div class="col-sm-4 " style = " display: flex; align-items: center ; justify-content: center" >
<p class=" font-weight-bold" style="text-align: center ">
<span style="color:green">Plot no: 12,<br>P.S.R. Colony,<br>Vizianagaram - 535002<br><br>
</span>
<span style="color:green">
8340979799 </br>
sathajeevanafoods#gmail.com
</span>
</p>
</div>
</div>
</footer>
<!-- jquery lib-->
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- bootstrap -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<!--fontawesome-->
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js" integrity="sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe" crossorigin="anonymous"></script>
<!--This is used for search icon. Instead putting icon manually it is loaded from fontawesome-->
<!-- MAP scripts -->
<script>
function myMap() {
var mapOptions = {
center: new google.maps.LatLng(18.1184,83.41799),
zoom: 10,
mapTypeId: google.maps.MapTypeId.HYBRID
}
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBu-916DdpKAjTmJNIgngS6HL_kDIKU0aU&callback=myMap"></script>
</body>
Probably it was covered by the main section, try and give the main section z-index of 1 And the footer z-index of 2.
Try it you see it appear some where and think of a logic to push it down. Or in alternative that you may add high margin-top let's say 1000px or anything else, you will see it appear.
It's there but it was overlaped by preceding codes.
Try it
I am trying to place in the correct order the mega menu for every screen or at least for the most common pc / laptop screens, but however, it looks like this. I am using twitter bootstrap 4 for this task
I want to keep the mega menu below the dropdown carpet without getting out of place
<li class="header__el open">
<a href="#" class="header__link dropdown-toggle" data-toggle="dropdown"
aria-expanded="true">header__link<b class="caret"></b></a>
<ul class="dropdown-menu dropdown-menu-large row" x-placement="bottom-start"
style="position: absolute;will-change: transform;top: 3rem;left: 10rem;margin: 1em;margin-left: 37%;transform: translate3d(23px, 22px, 0px);">
<div class="container-fluid">
<div class="row">
<div class="col-sm-4">
<div class="nav-group" style="margin-bottom:10px; border-bottom:none;">
<a href="#solutions-zero-trust-security?hsLang=en">
<h4>Zero Trust</h4>
</a>
<ul class="list-items space-0">
<li>Operationalize Zero Trust</li>
</ul>
</div>
<div class="nav-group" style="border-bottom:none;">
<h4>Industries</h4>
<ul class="list-items space-0">
<li>Financial Institutions</li>
<li>Law Firms</li>
<li>Retail/PCI</li>
<li>Federal</li>
<li>Airlines</li>
<li>Healthcare</li>
</ul>
</div>
</div>
<div class="col-sm-4" style="padding-right:0px;">
<div class="nav-group" style="border-bottom:none;">
<h4>Compliance & Risk</h4>
<ul class="list-items space-0">
<li>SWIFT</li>
<li>PCI</li>
</ul>
</div>
<div class="nav-group" style="border-bottom:none;">
<h4>Cloud</h4>
<ul class="list-items space-0">
<li>Amazon Web Services</li>
<li>Microsoft Azure</li>
<li>Google Cloud Platform</li>
<li>OpenStack</li>
<li>Multi-Cloud</li>
</ul>
</div>
</div>
<div class="col-sm-4">
<div class="nav-group">
<h4>Initiatives</h4>
<ul class="list-items space-0">
<li>Container Segmentation</li>
<li>Environmental Separation</li>
<li>Application Segmentation</li>
<li>Securing Application Migration</li>
<li>User Segmentation</li>
<li>Encrypting Data in Motion</li>
<li>Securing Microsoft Applications</li>
<li>Secure a New Data Center</li>
</ul>
</div>
</div>
</div>
</div>
</ul>
</li>
I need to change my logo location. I've tried any code i know from css but still cant change the location.
I want the logo to be at the same height of my menu.
Need your help please!
My website is : http://ktiniatreio-keratea.gr/
Add to css
.navbar-header{
display: inline-block;}
Put the:
<div class="main-navigation navbar-collapse collapse">
inside the class="navbar-header".
Your final code should look like:
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><i class="fa fa-bars"></i></button>
<img width="290" height="70" src="https://i2.wp.com/ktiniatreio-keratea.gr/wp-content/uploads/2018/03/cropped-logo_pet-2.png?fit=290%2C70" class="custom-logo" alt="Κτηνιατρικό Κέντρο : Λυγιάς – Νεοφύτου">
<div class="main-navigation navbar-collapse collapse">
<div id="mega-menu-wrap-primary" class="mega-menu-wrap">
<div class="mega-menu-toggle" tabindex="0">
<div class="mega-toggle-blocks-left">
<div class="mega-toggle-block mega-menu-toggle-block mega-toggle-block-1" id="mega-toggle-block-1"><span class="mega-toggle-label"><span class="mega-toggle-label-closed">MENU</span><span class="mega-toggle-label-open">MENU</span></span>
</div>
</div>
<div class="mega-toggle-blocks-center"></div>
<div class="mega-toggle-blocks-right">
<div class="mega-toggle-block mega-menu-toggle-block mega-toggle-block-2" id="mega-toggle-block-2"><span class="mega-toggle-label"><span class="mega-toggle-label-closed">MENU</span><span class="mega-toggle-label-open">MENU</span></span>
</div>
</div>
</div>
<ul id="mega-menu-primary" class="mega-menu max-mega-menu mega-menu-horizontal">
<li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-menu-item-home mega-current-menu-item mega-page_item mega-page-item-150 mega-current_page_item mega-align-bottom-left mega-menu-flyout mega-menu-item-157" id="mega-menu-item-157"><a class="mega-menu-link" href="http://ktiniatreio-keratea.gr/" tabindex="0">Αρχική</a></li>
<li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-241" id="mega-menu-item-241"><a class="mega-menu-link" href="http://ktiniatreio-keratea.gr/%ce%b9%ce%b1%cf%84%cf%81%ce%b5%ce%b9%ce%b1/" tabindex="0">Τα Ιατρεία</a></li>
<li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-242" id="mega-menu-item-242"><a class="mega-menu-link" href="http://ktiniatreio-keratea.gr/%cf%85%cf%80%ce%b7%cf%81%ce%b5%cf%83%ce%b9%ce%b5%cf%82/" tabindex="0">Υπηρεσίες</a></li>
<li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-521" id="mega-menu-item-521"><a class="mega-menu-link" href="http://ktiniatreio-keratea.gr/team/" tabindex="0">Προσωπικό</a></li>
<li class="mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-244" id="mega-menu-item-244"><a class="mega-menu-link" href="http://ktiniatreio-keratea.gr/contact/" tabindex="0">Επικοινωνία</a></li>
</ul>
</div>
</div>
</div>
add display: inline; to your navbar-header
e.g.
<div class="navbar-header" style="
display: inline;
">
in your class container
.container{
display:flex;
justify-content:space-between;
}
and
.main-navigation{
margin:auto;}
My dropkick look strange - http://i.imgur.com/0itAA.png
Container is bigger, than dropdown list.
My html:
<div class="text_over_field">
<b>Your language preferences</b>
<b>This is language you would like Print-it-Green service to be displayed in</b>
</div>
<div class="field">
<div class="dk_container dk_theme_default" id="dk_container_color" tabindex="7" style="display: block; ">
<a class="dk_toggle" style="width: 149px; ">
<span class="dk_label">English</span></a>
<div class="dk_options" style="top: 29px; ">
<ul class="dk_options_inner">
<li class="dk_option_current"><a data-dk-dropdown-value="">English</a></li>
<li class=""><a data-dk-dropdown-value="#E15A01">Israeli</a></li>
<li class=""><a data-dk-dropdown-value="#604A42">Ukrainian</a></li>
</ul>
</div>
</div>
</div>
<div class="submit" >
</div>
Check the CSS markup
Check the HTML markup
All is wrapped in form_for_new class.
Also, it crashed my form.
What you can say about it ?
I've got a strange problem with chrome.
My code works like a charm in safari, chrome (5.x.x), explorer and firefox. But with a recent chrome update (7.x or 8.x) it doesn't.
Here is the code i wrote:
<div class="result">
<div class="favoris">
<a class="favorisClick"><img src="images/favoris.png"</a>
</div>
<div class="favorisContent resultDim">
<h1 class="favTitle">0 FAVORIS</h1>
<ul id="favResult">
<!-- js insert things here -->
</ul>
</div>
<div class="resultContent resultDim">
<h1 class="nbrResult">0 TITRES</h1>
<ul id="resultContent">
<!-- js insert things here -->
</ul>
<div id="nav">
<ul>
</ul>
</div>
</div>
<div class="infos">
<a class="infosClick"><img src='images/infoUp.png' alt='show info' /></a>
<div class="infosContent">
<ul id="infosContent">
<li>Sélectionez un morceau.</li>
</ul>
<ul>
<li id="dl"></li>
<li></li>
</ul>
</div>
</div>
</div>
With safari, ff, old chrome and ie, i see this code with the added content by the js.
With a new version of chrome here's what i get :
<div class="result">
<div class="favoris">
<a class="favorisClick">
<img src="images/favoris.png" <="" a=""/>
</a>
</div>
<a class="favorisClick">
<div class="favorisContent resultDim" style="display: none; ">
<h1 class="favTitle">0 FAVORIS</h1>
<ul id="favResult">
</ul>
</div>
<div class="resultContent resultDim">
<h1 class="nbrResult">16 TITRES</h1>
<ul id="resultContent">
***RESULT CONTENT***
</ul>
<div id="nav">
</div>
</a>
<div class="infos">
<a class="favorisClick"/>
<a class="infosClick">
<div class="infosContent" style="display: none; ">
<ul id="infosContent">
</ul>
</div>
</div>
</div>
I dunno why it add this $&#$X1& <a class="favorisClick"> and </a> and the <a class="favorisClick" /> it happens ONLY whith recent chrome version ... it make me turn completely mad !!
I don't even know how to search for this issue on google...
Please help me :)
<div class="favoris">
<a class="favorisClick"><img src="images/favoris.png"</a>
</div>
It looks like you're not closing your image tag...