1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Max-width on text in threads without affecting embedded media

Discussion in 'Styling and Customization Questions' started by Håkan Olsson, May 26, 2016.

  1. Håkan Olsson

    Håkan Olsson Member


    I want to set max-width on text in thread posts.

    I tried Style Properties / Message Elements / Message Text / Miscellaneous ---> e.g., "max-width: 600px;". That works well for the text – but embedded video (XFMG) as well as images that reside within the post becomes affected too (unwanted). I need to control the text only.

    Is there some way to do this?
  2. Håkan Olsson

    Håkan Olsson Member

    What I'm trying to accomplish:

    I use responsive video embeds in thread. When browser is resized (bigger) the video is resized (bigger) as well, up to the limit I set by using the max-width property in EXTRA.css. So far no problems!

    At big browser widths, text paragraphs in post becomes enormous wide. Design for readability becomes nonexistent. Well, that is super simple to fix by using a max-width on the text too. So, I put that in (in Style Properties /... etc)

    But a problem now show up: The max-width assigned to the text also affects the video embed. E.g., if I set a 600px max-width on the text, then the video will not be shown bigger than 600px no matter how much I resize the browser. What I don't have but need is some way to control the width on the text only.

    (But I fear this isn't doable in a simple way. There is no text CSS property that deals with text width. Also, I guess video and text would need to reside in two different elements. Seems complicated. I wish I'm wrong.)

Share This Page