# 将投票框移至屏幕右侧

**URL:** https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752
**Category:** Bug
**Tags:** topic-voting
**Created:** [2019 年8 月 24 日 19:54 UTC](https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752 "2019-08-24T19:54:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [2019 年8 月 24 日 19:54 UTC](https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752/1 "2019-08-24T19:54:01Z")

</div>

我使用了投票插件，我的论坛是希伯来语，因此是右向左（RTL）布局。但投票框显示在左侧，而不是右侧：

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/0/201849f7e4fec350b03e46c44b35c9fd720205fd.png)

是否有可能添加一个选项，将其移动到屏幕右侧？或者提供一些 CSS 代码来实现右对齐？

谢谢！

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019 年8 月 26 日 08:23 UTC](https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752/2 "2019-08-26T08:23:34Z")

</div>

@Johani 这里需要插件修复吗？

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [2019 年8 月 27 日 08:21 UTC](https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752/8 "2019-08-27T08:21:48Z")

</div>

这将在以下地址修复：

> <https://github.com/discourse/discourse-topic-voting/pull/44>
>
> This PR refactors the plugin's CSS.
> 
> Notable changes:
> 
> 1. changes most \`px\` …units to \`em\` units (the ones left as \`px\` have good reasons to be)
> 2. uses flexbox for improved alignment
> 3. removes some unused styles (super votes)
> 4. improves support for RTL locales (this is TEMP see https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752 for more details. I added these to the very bottom for easy removal in the future once the main cause is fixed.
> 5. minor fixes like preventing the pop-up menu from overlapping with user-cards
> 
> Before (LTR - desktop)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753234-4740b600-c8e5-11e9-8d43-b97f9ef4ef06.png" width="500"\>
> 
> After (LTR - desktop)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63752970-c2559c80-c8e4-11e9-8010-e2230d22be63.png" width="500"\>
> 
> Before (RTL - desktop) 
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753290-5aec1c80-c8e5-11e9-8016-ccffc14ccd62.png" width="500"\>
> 
> After (RTL - desktop)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63752922-ab16af00-c8e4-11e9-80cf-c8e8542e0d5a.png" width="500"\>
> 
> Before (LTR - mobile)
> 
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753347-7b1bdb80-c8e5-11e9-9aa2-0a0117fd9c73.png" width="300"\>
> 
> After (LTR - mobile) 
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63752429-cd5bfd00-c8e3-11e9-84c6-1b5ce7a86157.png" width="300"\>
> 
> Before (RTL - mobile)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753323-6d665600-c8e5-11e9-9596-00dce70bf0c9.png" width="300"\>
> 
> After (RTL - mobile)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63752520-f9777e00-c8e3-11e9-8d02-f13addaed73c.png" width="300"\>
> 
> Before (user-card overlap)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753530-d5b53780-c8e5-11e9-8040-0fcf6d05fad6.png" width="400"\>
> 
> After (user-card overlap)
> 
> \<img src="https://user-images.githubusercontent.com/33972521/63753580-ea91cb00-c8e5-11e9-9b0d-f26ebc110c62.png" width="400"\>
> 
> The CSS still uses \`float\` to position the voting area next to the title, which not ideal. I wanted to get rid of that but the current implementation / layout still requires it. Hopefully I'll be able to revisit in the future and fix that.

感谢您报告此问题 @verilog15 👍

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [2019 年8 月 28 日 10:00 UTC](https://meta.discourse.org/t/moving-the-voting-box-to-the-right-side-of-the-screen/126752/9 "2019-08-28T10:00:00Z")

</div>

此主题已在 25 小时后自动关闭，不再接受新回复。
