i use magento 2.1.1. i want to create a top links in left or right side above header. i attaching the following image of..My Html page i want to add a links like All flowers, All cakes, etc to left side and delivery, currency in right side at the top of header, but in Magento 2 layout overview link, display in right side. how i add a left side header links in magento 2...? please help...

1 Answer 1


You can use the below code to your default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceContainer name="header.panel">
            <container name="header-category" label="Header Category" as="header-category" htmlTag="div" htmlClass="header-category-wrapper" before="-">
                <block class="Magento\Framework\View\Element\Template" name="header_category" as="header_category" template="Magento_Theme::html/header/categories.phtml"/>

Now create one file named categories.phtml under


Now here you can add your code. After this you can manage that particular container whose class is "header-category-wrapper" by css.


And add some more styling and adjustment according to your requirement.

Hope this helps!

  • thanks, but all css of header was removed. i adding a cutom css was not applied, i add a <css src="css/styles.css"/> in head tag. Commented May 31, 2018 at 12:33
  • Don't remove the existing content of default.xml only add the code I have written here. Commented May 31, 2018 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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