Jump to content

Make Photos Display as Circle instead of Square


Recommended Posts

I am using a search and report DataPage to display a user's profile photo until landing on my Dashboard page. I would like the photo to appear as a circle (just like our profile photo for this forum in the upper-right corner). Any idea on how to do that? I also want the "Welcome, Myles" to be centered vertically to the image.

 

Screenshot (143).png

Link to comment
Share on other sites

10 hours ago, DaeBo said:

I am using a search and report DataPage to display a user's profile photo until landing on my Dashboard page. I would like the photo to appear as a circle (just like our profile photo for this forum in the upper-right corner). Any idea on how to do that? I also want the "Welcome, Myles" to be centered vertically to the image.

 

Screenshot (143).png

As far as I can see, forum's profile photo has the following attribute, which you may try using: border-radius: 45px;

You need to define that for the img element.

Regarding placing text in the middle, the following attribute should do the trick:

vertical-align: middle;
Link to comment
Share on other sites

  • 2 weeks later...

I tried this in my header and added HTML Block to create my images and it worked like a charm.

 

<style>
  img {
  border-radius: 50%;
}
</style>

The style rule above is the shorthand for:

image{

  border-top-left-radius: 50% 50%;
  border-top-right-radius: 50% 50%;
  border-bottom-right-radius: 50% 50%;
  border-bottom-left-radius: 50% 50%;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...