Re: Targeting an Image in Header

How can I resize an icon added to my website header?

hellocc
Excursionist
50 0 7

Hi,

 

I'm trying to remove the login/logout text in my theme and replace them with the an icon.

I have added the icon to my header (see code below) but I can' seem to target it in order to make it smaller. 

Can anyone help please? Thank you!

 

 

 

          {% if shop.customer_accounts_enabled %}
            {% if customer %}
              <li class="top-bar__menu-item">
                <a
                  class="top-bar__menu-item-link"
                  id="customer_logout_link"
                  href="{{ routes.account_logout_url }}"
             >

<span  id="customer_login_link"> <img src="https://cdn.shopify.com/s/files/1/0760/8457/6545/files/account_icon_2f25c866-ba5a-43c8-8be0-c2dad31ec4ed.png?v=1708023560" alt="account" /></span>


                  
                  {{- 'layout.customer.log_out' | t -}}
                </a>
              </li>
              {% if customer.name != blank %}
                <li class="top-bar__menu-item">
                  <a
                    class="top-bar__menu-item-link"
                    href="{{ routes.account_url }}"
                    data-no-instant
                  >
                    {{- customer.name -}}
                  </a>
                </li>
              {% endif %}
            {% else %}
              <li class="top-bar__menu-item">
                <a
                  class="top-bar__menu-item-link"
                  id="customer_login_link"
                  href="{{ routes.account_login_url }}"   
                >

                  <span  id="customer_login_link"> <img src="https://cdn.shopify.com/s/files/1/0760/8457/6545/files/account_icon_2f25c866-ba5a-43c8-8be0-c2dad31ec4ed.png?v=1708023560" alt="account" /></span>


                  
                  {{- 'layout.customer.log_in' | t -}}
                </a>
              </li>
            {% endif %}
          {% endif %}

 

 

 

 

Screen Shot 2024-02-15 at 3.06.06 PM.png

 

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
11414 2239 2412

Hi @hellocc 

I'm Dan from Ryviu: Product Reviews & QA

 

You can remove those parts to remove those codes to remove the texts 

Screenshot 2024-02-16 at 15.21.46.png

Best Regards,

 

Dan

- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

BSS-Commerce
Shopify Partner
3477 464 554

Hi @hellocc ,

Insert attribute width and height on <img> tag

width="20" height="20"

view - 2024-02-19T090426.435.png

And this is the final result:

view - 2024-02-19T090451.193.png

Hope it works @hellocc 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency