0

I need to move top.search from right side to left side as per given in screenshot, I tried this below move element but this is not working

<move element="top.search" destination="header-wrapper" before="-" />

enter image description here

1

Update your move tag using below code :

app/design/frontend/VendorName/ThemeName/Magento_Theme/layout/default.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> 
    <body>
        <move element="top.search" destination="header-wrapper" before="logo" />
    </body>  
</page>

Now, You need to update less code also :

.block-search {
    float: left;
}

Now, Just upgrade & deploy. You can see search will display to left side.

1
  • 1
    thank you for answer i miss the css part , it's work fine after apply css.
    – Jay Parmar
    Jun 25 '21 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.