# Poll height on mobile with image content

**URL:** https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515
**Category:** Bug
**Tags:** polls
**Created:** [08.Май.2015 19:50:04 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515 "2015-05-08T19:50:04Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [08.Май.2015 19:50:04 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/1 "2015-05-08T19:50:04Z")

</div>

Continuing the discussion from [Polls don't fit on mobile](https://meta.discourse.org/t/polls-dont-fit-on-mobile/28413/6):

> [@Polls don't fit on mobile](https://meta.discourse.org/t/polls-dont-fit-on-mobile/28413/4):
>
> Could you remove the height style on .poll-container on both desktop and mobile?  
> As it is now:  
> ![](https://global.discourse-cdn.com/meta/original/3X/0/b/0bb61bf0c6af667095bdbcd78f5739acafd75180.png)
> 
> With `height` style removed:  
> ![](https://global.discourse-cdn.com/meta/original/3X/7/5/75ffc26673667ba5b9f23d57a65a2839619823f5.png)

> [@Polls don't fit on mobile](https://meta.discourse.org/t/polls-dont-fit-on-mobile/28413/6):
>
> As for the height, it’s there to make sure the height of the poll doesn’t change between the views. I can’t reproduce your issue though.

I’ve just reproduced this issue on `try.discourse.org` (obviously it’s likely to be reset soon):  
[http://try.discourse.org/t/poll-test-looking-into-images-in-polls/323](http://try.discourse.org/t/poll-test-looking-into-images-in-polls/323)

Screen grab:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/1/c11c239892b8fb98ebd6047525a2fad66b83b7fd.png)

Here is the relevant post raw code I used:

```
[poll name=with_content]
- My first image <img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png" height="100">
- Emoji: :smile: 
[/poll]

[poll name=with_content2]
- My first image <img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png" height="150">
- Emoji: :smile: 
[/poll]
[poll name=with_content3]
- My first image <img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/7/2/72d2687d1d00c52c546727efbbc6d726f6e153de.png">
- Emoji: :smile: 
[/poll]

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [08.Май.2015 21:01:47 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/2 "2015-05-08T21:01:47Z")

</div>

I have on my TODO list to whitelist elements available inside poll options and the more I think about it, the less likely I am to whitelist images and links. Right now, I’m thinking only allowing emojis.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [08.Май.2015 21:03:41 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/3 "2015-05-08T21:03:41Z")

</div>

On one of the forums polls currently specifically for voting for images of cars - without images polls would be useless to me (that forum).

It works well without the fixed height style attribute.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [08.Май.2015 21:29:10 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/4 "2015-05-08T21:29:10Z")

</div>

Not so, you could do this

> Image of cat named Tiger
> 
> Image of cat named Fluffy
> 
> Image of cat named Lady
> 
> [Poll]
> 
> - Vote for Tiger
> - Vote for Fluffy
> - Vote for Lady

I agree that allowing images inside the buttons is a whole can of worms we don’t want to get into

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [08.Май.2015 21:30:08 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/5 "2015-05-08T21:30:08Z")

</div>

That is actually what we used to do on vBulletin. Post the images above and poll below it for them to choose which they liked best (the images were never part of the poll itself)

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [08.Май.2015 21:30:21 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/6 "2015-05-08T21:30:21Z")

</div>

We tried this - it doesn’t work well as cars don’t have names - it gives a bad user experience saying “A”, “B”, “C” - clicking images is best.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [08.Май.2015 21:30:40 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/7 "2015-05-08T21:30:40Z")

</div>

Too problematic for layout – sorry.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [08.Май.2015 22:44:49 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/8 "2015-05-08T22:44:49Z")

</div>

Is it possible to use something like this to get the correct height when the images are loaded?

> <https://stackoverflow.com/questions/15273891/how-to-notify-parentview-that-an-image-in-a-childview-has-been-loaded-in-emberjs/15286598#15286598>

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [16.Август.2015 20:28:13 UTC](https://meta.discourse.org/t/poll-height-on-mobile-with-image-content/28515/9 "2015-08-16T20:28:13Z")

</div>


