Reducing white space and increasing main content column width

AI-generated summary

The discussion revolves around reducing white space and increasing the main content column width in Discourse. ron_jeremy initially proposed the idea but later decided not to pursue it due to lack of technical expertise. jcasman expressed interest in modifying the CSS to achieve this, particularly for posting documentation. However, they encountered difficulties overriding the existing CSS.

codinghorror suggested modifying the relevant CSS while being mindful of media queries. dax provided a code snippet to increase the space for messages by setting the min-width of .topic-body to 66%, noting that exceeding 70% might require adjusting the timeline. Falco pointed out that creating a Table of Contents (TOC) is possible using deeplinks support, referencing a related topic on deep linking to headings and anchors.

I’m not sure if this is even possible or even a good idea, but wanted to ask, nonetheless.

Yes, just modify the relevant CSS.

Be mindful of media queries so you set the width appropriately scaled to browser width and never “all the way across”.

2 лайка

@ron_jeremy Were you able to edit your CSS to widen the main column and/or get rid of more white space? Do you have an example? I can use the customize CSS/HTML section to add some CSS to the Discourse pages, but I can’t seem to override what’s already there, so I’m not getting any change to my pages. Any help appreciated.

No, after reconsidering, I just left it as is. I would not have the skill/knowledge to do this on my own, anyways.

Ok, thanks for the response.

Anyone else? I am looking for a way to post documentation in Discourse. I believe that the standard Discourse “look” isn’t conducive to documentation. No easy way to create a Table of Contents (TOC) for one piece of documentation, for example. Mostly I see communities that have one system for documentation (maybe ASCIIDoc) and another (Discourse) for forum interactions. They do not use Discourse for both. I was hoping to just post more documentation directly in Discourse. One simple tweak would be widening the main Discourse column to look more like normal documentation. After looking at a bunch of other communities that use Discourse, I believe posting documentation into the forum is basically not done.

Try in another way, instead to reduce the white space, try to increase the space for messages:

.topic-body {
  min-width: 66%; 
}

I don’t recommend to use more than 70% otherwise you need to move on the right the timeline too.
If you want you can try btw.

The amount of white space on the right (or left) depends from screens resolution.

1 лайк

There is deeplinks support now, so it’s possible:

2 лайка