# Nav wrapping in small window with long translations of "login"

**URL:** https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826
**Category:** Feature
**Created:** [2015 年 8 月 6 日午前 11:30 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826 "2015-08-06T11:30:55Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)
#### Post date: [2015 年 8 月 6 日午前 11:30 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/1 "2015-08-06T11:30:55Z")

</div>

Site logo and icons do not play together well on small screen.

Expected:

- either scale logo or use the smaller one

Screenshot from Android:

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

Workaround:

> [@codinghorror](#):
>
> In the case of long translated words, if in your language “login” is “mshehjensgsybsnjjebeggsjksoeomendmxkskelflr” you will need to set a max-width via CSS on the relevant controls, or make the mobile logo width smaller via CSS.

Thanks!

---

<div class="post-metadata">

### Author: ![ndalliard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ndalliard/32/44338_2.png) [@ndalliard](https://meta.discourse.org/u/ndalliard)
#### Post date: [2015 年 8 月 6 日午前 11:40 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/2 "2015-08-06T11:40:22Z")

</div>

Jep same here. View when you’re logged in:

 ![](https://global.discourse-cdn.com/meta/original/3X/b/3/b303b770762050fc9d2b8c8124d34b93bad0600b.png)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2015 年 8 月 6 日午後 4:29 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/3 "2015-08-06T16:29:48Z")

</div>

Is this Mobile view or a narrowed Desktop view only?

If Desktop, is it “normal use” to have the viewport so narrow?

---

<div class="post-metadata">

### Author: ![ndalliard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ndalliard/32/44338_2.png) [@ndalliard](https://meta.discourse.org/u/ndalliard)
#### Post date: [2015 年 8 月 6 日午後 4:43 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/4 "2015-08-06T16:43:41Z")

</div>

Oh so true. On mobile there is no problem and on the desktop you should never have the window that narrow. But thats just for me, I dont now if @gtanczyk uses narrow windows…

---

<div class="post-metadata">

### Author: ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)
#### Post date: [2015 年 8 月 6 日午後 4:44 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/5 "2015-08-06T16:44:12Z")

</div>

Screenshot was done on desktop, however it’s the same on mobile browser, when your logo width exceeds some threshold.  
Please also mind I18n translations for **Log in** , **Sign in** buttons. In polish language it is “Logowanie” and “Rejestracja”, which takes few more pixels than corresponding english words.

---

<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: [2015 年 8 月 7 日午前 2:05 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/6 "2015-08-07T02:05:01Z")

</div>

This is not a bug report, the layout is different in mobile. Please provide mobile screenshots, a tiny desktop / laptop / tablet width makes no sense.

---

<div class="post-metadata">

### Author: ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)
#### Post date: [2015 年 8 月 7 日午前 4:14 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/7 "2015-08-07T04:14:46Z")

</div>

Hello, I have uploaded screenshot from mobile.

---

<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: [2015 年 8 月 7 日午前 4:26 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/8 "2015-08-07T04:26:08Z")

</div>

In the case of long translated words, if in your language “login” is “mshehjensgsybsnjjebeggsjksoeomendmxkskelflr” you will need to set a max-width via CSS on the relevant controls, or make the mobile logo width smaller via CSS.

---

<div class="post-metadata">

### Author: ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)
#### Post date: [2015 年 8 月 7 日午前 5:16 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/9 "2015-08-07T05:16:22Z")

</div>

Thanks for providing workaround.

---

<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: [2015 年 8 月 7 日午前 6:24 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/10 "2015-08-07T06:24:15Z")

</div>

More specifically, now that I am not on an iPad but in front of a real computer, these CSS rules already exist, so you can amend them or add to them in Admin, Customize, CSS/HTML:

```plaintext
.d-header button.login-button {
    margin-left: 7px;
    max-width: 75px;
    white-space: nowrap;
}

```

here we set a max width on `login-button` and indicate the text should not wrap to the next line.

```plaintext
.d-header #site-logo {
    max-width: 125px;
}

```

there is already a max-width specified for the mobile logo CSS, so you can make it smaller as needed with a CSS override.

---

<div class="post-metadata">

### Author: ![gtanczyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gtanczyk/32/44608_2.png) [@gtanczyk](https://meta.discourse.org/u/gtanczyk)
#### Post date: [2015 年 8 月 7 日午前 6:32 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/11 "2015-08-07T06:32:46Z")

</div>

How about using `display: table` and `display: table-cell` along with `white-space: nowrap`? I am also thinking about `text-overflow: ellipsis` and `max-width` on “Log in” button.

Perhaps this way there will be no need for CSS overrides. I will test it today and maybe start a PR.

---

<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: [2015 年 8 月 7 日午前 7:16 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/12 "2015-08-07T07:16:21Z")

</div>

Be careful, changes to header can be very dangerous, as we have seen from our (1st and 2nd failed) attempts to use flexbox in the header..

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2025 年 12 月 4 日午前 11:36 UTC](https://meta.discourse.org/t/nav-wrapping-in-small-window-with-long-translations-of-login/31826/13 "2025-12-04T11:36:53Z")

</div>


