# CSS tweak for bigger avatar icons in polls?

**URL:** <https://meta.discourse.org/t/css-tweak-for-bigger-avatar-icons-in-polls/115575>\
**Category:** Product Support\
**Created:** [21.Апрель.2019 06:58:37 UTC](https://meta.discourse.org/t/css-tweak-for-bigger-avatar-icons-in-polls/115575 "2019-04-21T06:58:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [22.Апрель.2019 16:56:07 UTC](https://meta.discourse.org/t/css-tweak-for-bigger-avatar-icons-in-polls/115575/2 "2019-04-22T16:56:07Z")

</div>

You don’t want to do this with CSS because the avatars are only 20x20px, so increasing the size will make them noticeably blurry.

You’d instead want to reopen the widget and request a larger avatar size… You can add this to your theme’s `/head` file. This overrides the existing widget and requests a large avatar instead of a tiny one.

```plaintext
<script type="text/discourse-plugin" version="0.8.13">
const { h } = require('virtual-dom');
const { avatarFor } = require('discourse/widgets/post');

api.reopenWidget("discourse-poll-voters", {
  html(attrs, state) {
    if (attrs.voters && state.loaded === "new") {
      state.voters = attrs.voters;
    }

    const contents = state.voters.map(user => {
      return h("li", [
        avatarFor("large", {
          username: user.username,
          template: user.avatar_template
        }),
        " "
      ]);
    });

    if (state.voters.length < attrs.totalVotes) {
      contents.push(this.attach("discourse-poll-load-more", attrs));
    }

    return h("div.poll-voters", contents);
  }
});
</script>

```

Then you’d have a 45px avatar to work with, and if you optionally wanted to adjust the size a little more with CSS:

```css
.poll-voters-list {
  img.avatar {
    width: 40px;
    height: 40px;
  }
}

```

---

_[View the full topic](https://meta.discourse.org/t/css-tweak-for-bigger-avatar-icons-in-polls/115575)._
