@DownPW said in [NODEBB] Help for my custom CSS:
OK Thank you. Logo I guess
Sort of.
You can stop most of the overflow with the below CSS
body {
overflow-x: hidden;
max-width: 100%;
}
Add the above to the existing body
class you have.
For the remainder, it’s much easier to see where elements burst outside of their boundaries by using the global CSS below, which will draw a border around every single element - effectively, making it much easier to see
* {
outline: 1px solid red;
}
This then yields the below
As you can clearly see, the additional navigation buttons you have are flowing outside of their allowed space, which causes the body to expand to accommodate the new size. This produces the undesired effect of scrolling on the entire body.
Then, look at the class of
[data-widget-area=brand-header] {
justify-content: end;
display: flex;
}
If you remove display: flex;
from this class, the icons are then stacked vertically, and the problem resolves itself. However, this looks ugly. A better way of getting closer to the result you want is to resize the logo
[component="brand/logo"] {
max-height: 100px;
width: auto;
height: 75px;
margin-top: -1px;
height: 45px;
}
Here, we’ve dropped the image size from 75px
to 45px
, which in turn pulls the expanded DIV
back into line
The problem we then have is the site title, but can easily fix that with the below CSS
@media (max-width: 768px) {
a.text-truncate.align-self-stretch.align-items-center.d-flex h1 {
height: 55px;
}
}
This then yields
Everything now aligns correctly, and more importantly, the scrolling body is no more.