1. Aaron DC

    Aaron DC Contributor Contributor

    Joined:
    May 12, 2015
    Messages:
    2,605
    Likes Received:
    1,320
    Location:
    At my keyboard

    Suggestion / Query: text width in posts

    Discussion in 'Support & Feedback' started by Aaron DC, Jun 16, 2015.

    When previewing a post, the text is X wide, about half the width of my screen or less (40%?). A fantastic width for reading and sentence tracking.

    When viewing the final post, it fills the screen.

    Is there any way to restrict the width post text so it only fills half the screen or so? It's very difficult to read sentences that stretch so wide. It's a phenomenon employed in most publications (don't fill the width with text, or make the object containing the text book-wdith) and makes reading people's writing a bit of a strain. I'm old n all, innit?

    I did a search on "post width" (both with and without inverted commas) but did not see anything like this. My screen res is 1920 x 1080 @ 24".

    Thanks!
     
  2. A.M.P.

    A.M.P. People Buy My Books for the Bio Photo Contributor

    Joined:
    Sep 30, 2013
    Messages:
    2,163
    Likes Received:
    1,374
    Location:
    A Place with no History
    I just press enter rather often to keep my posts focused rather than stretched.
    Like this, see?
    Makes it way easier to organize too :p
     
  3. Aaron DC

    Aaron DC Contributor Contributor

    Joined:
    May 12, 2015
    Messages:
    2,605
    Likes Received:
    1,320
    Location:
    At my keyboard
    Oh yes, I can do that for my posts,
    easily.

    However I would like to contribute
    to other people's writing. And them
    what don't do it are hard to read
    n all innit?
     
  4. Komposten

    Komposten Insanitary pile of rotten fruit Contributor

    Joined:
    Oct 18, 2012
    Messages:
    3,016
    Likes Received:
    2,193
    Location:
    Sweden
    I don't think something like this is doable with the forum software, at least not as an adjustable setting. It could be done using some javascript hacks to modify the page's code locally, but that isn't a particularly pretty solution and would require browser plugins. :(
     
  5. Aaron DC

    Aaron DC Contributor Contributor

    Joined:
    May 12, 2015
    Messages:
    2,605
    Likes Received:
    1,320
    Location:
    At my keyboard
    I only offer the following in the spirit of assistance and potentially improved readability:

    [​IMG]

    Add the following CSS modifier:

    HTML:
    .messageText {
      max-width: 800px;
    }
    [​IMG]

    Only tested in FF 37, but for me it works nicely and makes the text far more readable :D

    Probably not something that could be implementable as a setting, although I have no xenforo experience. I added the CSS modifier using web developer toolbar, so it's a temporary change local to this instance of this page. Do not have experience in doing changes via webmonkey or whatever that stuff is.
     
  6. Komposten

    Komposten Insanitary pile of rotten fruit Contributor

    Joined:
    Oct 18, 2012
    Messages:
    3,016
    Likes Received:
    2,193
    Location:
    Sweden
    This is exactly the same thing I played around with, and also what I was referring to when I said "javascript hacks". There are plugins for Chrome and Opera (probably other browsers as well) that allow you to set javascripts to automatically execute when a page loads, so you wouldn't have to change the CSS manually every time you open a thread, refresh the page, etc. With jQuery such a script wouldn't be much more than this: $(".messageText").css("width", "800px"). It is possible to paste this script into the address bar, prefix it with javascript:, and press enter in order to execute it and change the style (which is faster than manually editing the CSS using Dev Tools).

    I think it should be pretty easy to change this style globally across the forum, for everyone, from the Admin Control Panel. However, in order to make it a setting that every user can set to their personal preference you'd need a plug-in. I'd love to make such a plug-ins myself (or at least try to), but you need to have a XenForo license in order to be able to write and test plug-ins (if I'm not mistaken).
     
    Last edited: Jun 29, 2015
  7. Aaron DC

    Aaron DC Contributor Contributor

    Joined:
    May 12, 2015
    Messages:
    2,605
    Likes Received:
    1,320
    Location:
    At my keyboard
    Here's what I did in Firefox:


    HTML:
    @namespace url(http://www.w3.org/1999/xhtml);
    
    @-moz-document domain("www.writingforums.org") {
    
    .messageText {
      max-width: 800px;
    }
    
    }
    [​IMG]

    There's a similar add-on for Chrome.

    This means that every post wraps at 800px for every page within this website alone. You just need to modify the 800 to some other value you prefer for wider or narrower text.
     
  8. Komposten

    Komposten Insanitary pile of rotten fruit Contributor

    Joined:
    Oct 18, 2012
    Messages:
    3,016
    Likes Received:
    2,193
    Location:
    Sweden
    There are many ways to this kind of thing, but what I don't like is that they all feel like hacks. Surely there must be some kind of "accessibility" plugin for XenForo to solve this and similar problems?
    *Opens Google to start searching yet again*
     
  9. Aaron DC

    Aaron DC Contributor Contributor

    Joined:
    May 12, 2015
    Messages:
    2,605
    Likes Received:
    1,320
    Location:
    At my keyboard
    Sorry that my attempt at assistance is inadequate and feels like a hack.
    It works, and in my experience, when it comes to software, that's better than just about anything else.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice