cancel
Showing results for 
Search instead for 
Did you mean: 

add text to mobile header section luma theme

add text to mobile header section luma theme

I successfully added text for screen width 768 or larger

423.png

 

 

But the text dropped to below the header section for screen under 768 width.

411.png

 

I am using 2.3.1 default luma theme.

Here is how do I add the text.

I created a block: top-icon:

420.png

 

 

 

And then in vendor/magento/theme-frontend-luma/Magento_Theme/layout/default.xml

add this code

<referenceContainer name="header-wrapper">
    <block class="Magento\Cms\Block\Block" name="top-icon">
        <arguments>
            <argument name="block_id" xsi:type="string">top-icon</argument>
        </arguments>
    </block>
</referenceContainer>

Please help me to keep the text in top on mobile. Thank you