Jump to content

Changing the login/Account text to a svg icon

Recommended Posts

  • 1 month later...
On 1/17/2022 at 1:33 PM, Samuelb7227 said:

Sory my website is 

 

banditstreetwear.com.au

Add to Design > Custom CSS

span.unauth {
    background-image: url(http://assets.stickpng.com/images/585e4bf3cb11b227491c339a.png );
    color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
  • 2 weeks later...
On 4/19/2022 at 5:44 PM, ChloeCL said:

Hello, I'm trying to do something similar, I want to replace the current account icon with this one https://fonts.google.com/icons?selected=Material Icons Outlined%3Aperson_outline%3A

My website is https://www.cooliconlighting.com/

Can anyone help please?

Thanks!

Hi,

First, access font google icon >> You will see options to download it as svg or png. Download svg then name it: cart.svg

Next, upload it to your site

Next, add this to Design > Custom CSS

/* new icon */
.user-accounts-icon {
    background-image: url(https://www.cooliconlighting.com/s/cart.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
}
.user-accounts-icon svg {
    visibility: hidden;
}

If it doesn't work, keep the code & let me know. We can check it again easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
59 minutes ago, florenza said:

However, what is the CSS code to replace the 'Login' text with another text like 'Members Only'

Add the following to Design > Custom CSS.

Header User Accounts Login Text Change.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 months later...
On 9/13/2022 at 7:45 PM, mmaxime2 said:

Hello,

I changed the login text to an icon but now the position is right on the website but I'd like it centered on the mobile menu. 

Is it possible?

Thank you!

247296329_Capturedcran2022-09-13143141.thumb.jpg.6a44dfbd10f2d865814fd02626b671bb.jpg

2085639403_Capturedcran2022-09-13143054.jpg.6e64d906c82d704287f839bdf895e4e5.jpg

 

Which code did you use?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 9/17/2022 at 10:42 AM, tuanphan said:

Which code did you use?

.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://i.ibb.co/vVt7mVr/iconaccount.png);
    background-size: contain;
    background-repeat: no-repeat;
background-position: right;
}
.user-accounts-text-link span.unauth { visibility:hidden }

Link to comment
On 9/18/2022 at 5:29 PM, mmaxime2 said:

.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://i.ibb.co/vVt7mVr/iconaccount.png);
    background-size: contain;
    background-repeat: no-repeat;
background-position: right;
}
.user-accounts-text-link span.unauth { visibility:hidden }

Change your code to this

.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://i.ibb.co/vVt7mVr/iconaccount.png);
    background-size: contain;
    background-repeat: no-repeat;
background-position: right;
}
.user-accounts-text-link span.unauth { visibility:hidden }
@media screen and (max-width:991px) {
.user-accounts-text-link {
background-position: center;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
3 hours ago, tuanphan said:

Change your code to this

.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://i.ibb.co/vVt7mVr/iconaccount.png);
    background-size: contain;
    background-repeat: no-repeat;
background-position: right;
}
.user-accounts-text-link span.unauth { visibility:hidden }
@media screen and (max-width:991px) {
.user-accounts-text-link {
background-position: center;
}
}

 

It worked perfectly! Thank you!

Link to comment
  • 9 months later...
On 9/20/2022 at 11:31 AM, tuanphan said:

Change your code to this

.user-accounts-text-link {
    color: transparent !important;
    background-image: url(https://i.ibb.co/vVt7mVr/iconaccount.png);
    background-size: contain;
    background-repeat: no-repeat;
background-position: right;
}
.user-accounts-text-link span.unauth { visibility:hidden }
@media screen and (max-width:991px) {
.user-accounts-text-link {
background-position: center;
}
}

 

Hey there! I used the following code and it works in the "Custom CSS Preview". However, it doesn't display anything on my live website, also not in incognito mode. Do you have any clue why?

Here's the link to my website:

https://onetimesecret.com/secret/j55f4dbd4furuy2yvfq1fc3ljo1et2t

That's the Code I used:

/* Login text to icon */
.user-accounts-text-link {
    color: transparent !important;
    background-image: url(/s/account.svg);
    background-size: contain;
    background-repeat: no-repeat;
	background-position: right;
}
/* center login icon on mobile */
.user-accounts-text-link span.unauth { visibility:hidden }
@media screen and (max-width:991px) {
.user-accounts-text-link {
background-position: center;
  margin-top: 50px !important;
}
}

 

Edited by mastermaisu
Link to comment
On 7/10/2023 at 4:19 PM, mastermaisu said:

Hey there! I used the following code and it works in the "Custom CSS Preview". However, it doesn't display anything on my live website, also not in incognito mode. Do you have any clue why?

Here's the link to my website:

https://onetimesecret.com/secret/j55f4dbd4furuy2yvfq1fc3ljo1et2t

That's the Code I used:

/* Login text to icon */
.user-accounts-text-link {
    color: transparent !important;
    background-image: url(/s/account.svg);
    background-size: contain;
    background-repeat: no-repeat;
	background-position: right;
}
/* center login icon on mobile */
.user-accounts-text-link span.unauth { visibility:hidden }
@media screen and (max-width:991px) {
.user-accounts-text-link {
background-position: center;
  margin-top: 50px !important;
}
}

 

Sometime upload files won't work on Trial Plan.

If you upgrade to paid plan + still have problems, let me know, we will check it again

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 months later...
On 10/6/2023 at 5:53 AM, nahlah said:

@tuanphan is it possible to have the login icon next to the cart on mobile similar to the desktop view

 

my site is www.faceoflove.co

Use this CSS code

a.user-accounts-text-link {
    background-image: url(https://static1.squarespace.com/static/62db1f440fdb0b1fc368501f/t/651f1c08261405661fb91f5d/1696537608653/Untitled+design+%2845%29.png);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    color: transparent !important;
    height: 28px;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 4 months later...
On 10/7/2023 at 11:08 AM, tuanphan said:

Use this CSS code

a.user-accounts-text-link {
    background-image: url(https://static1.squarespace.com/static/62db1f440fdb0b1fc368501f/t/651f1c08261405661fb91f5d/1696537608653/Untitled+design+%2845%29.png);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    color: transparent !important;
    height: 28px;
}

 

Hi @tuanphan, could you help me with this?

I would like to replace the 'login' text with this icon: <a href="https://www.flaticon.com/free-icons/user" title="user icons">User icons created by Freepik - Flaticon</a>

Also, once the text is changed to an icon, I would like to turn off the underline on hover for that icon.

URL: threadsonline.co.uk

Password: asdfghjkl

Thanks! 🙂 

 

Link to comment
On 3/1/2024 at 4:48 PM, threadsonline said:

Hi @tuanphan, could you help me with this?

I would like to replace the 'login' text with this icon: <a href="https://www.flaticon.com/free-icons/user" title="user icons">User icons created by Freepik - Flaticon</a>

Also, once the text is changed to an icon, I would like to turn off the underline on hover for that icon.

URL: threadsonline.co.uk

Password: asdfghjkl

Thanks! 🙂 

 

Hi @tuanphan,

I have been playing around with this code trying to replace the word 'login' with the attached icon. I paid for the premium account on Flaticon to download the icon as a SVG but I still can't get this to work. 

Maybe iIm not using the correct URL for the icon, I downloaded it as s SVG off Flaticon then right clicked > inspect and the copied the attached URL.

Please help!! 😞 Store: https://threadsonline.co.uk/ Password: asdfghjkl

I tried this code:

a.user-accounts-text-link {
    background-image: url(http://www.w3.org/2000/svg);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    color: transparent !important;
    height: 28px;
}

Screenshot 2024-03-02 215700.png

user (2).png

Link to comment
On 3/3/2024 at 5:00 AM, threadsonline said:

Hi @tuanphan,

I have been playing around with this code trying to replace the word 'login' with the attached icon. I paid for the premium account on Flaticon to download the icon as a SVG but I still can't get this to work. 

Maybe iIm not using the correct URL for the icon, I downloaded it as s SVG off Flaticon then right clicked > inspect and the copied the attached URL.

Please help!! 😞 Store: https://threadsonline.co.uk/ Password: asdfghjkl

I tried this code:

a.user-accounts-text-link {
    background-image: url(http://www.w3.org/2000/svg);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    color: transparent !important;
    height: 28px;
}

Screenshot 2024-03-02 215700.png

user (2).png

This is invalid url. You can send me image file, I can give you exact code

image.png.3f1bb135fb1ad1bedf4073148da64903.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.