XF 2.3 How to change the width of article threads?

Levina

Active member
Hi everybody!

I would like to make the text of article threads narrower. Right now they are the entire width of the forum page. With the page set to 1850px wide the text becomes ridiculously wide. I saw some code by Paul, but it's from 2020 and I don't know if it would work in 2.3?

How can this be achieved?

Thanks!
 
Last edited:
Solution
Hi Ozzy!

I was afraid to try it, but since you asked I thought it'd be okay and I'm happy to report that it works! So you helped me by asking a question. How cool is that?

However, I still could use a bit of help because it is left aligned and I would of course like it to be centred but I'm not sure how and what exactly to add to Paul's code in extra.less to accomplish that.
Try this:

Code:
[data-template="thread_view_type_article"]
{
    .message--article
    {
        width: 600px;
        margin: 0 auto;
    }
}

"margin: 0 auto" should center it.
Hi Ozzy!

I was afraid to try it, but since you asked I thought it'd be okay and I'm happy to report that it works! So you helped me by asking a question. How cool is that?

However, I still could use a bit of help because it is left aligned and I would of course like it to be centred but I'm not sure how and what exactly to add to Paul's code in extra.less to accomplish that.
 
Hi Ozzy!

I was afraid to try it, but since you asked I thought it'd be okay and I'm happy to report that it works! So you helped me by asking a question. How cool is that?

However, I still could use a bit of help because it is left aligned and I would of course like it to be centred but I'm not sure how and what exactly to add to Paul's code in extra.less to accomplish that.
Try this:

Code:
[data-template="thread_view_type_article"]
{
    .message--article
    {
        width: 600px;
        margin: 0 auto;
    }
}

"margin: 0 auto" should center it.
 
Solution
Back
Top Bottom