Search code examples
wordpresscssflexboxfluid-layout

Fluid layout with fixed left and fluid right


On THIS page, I have blocks of code with display: flex;, each divided in 2: a div with a class of myth-thumb, with a fixed with and a div containing text that should wrap, so that the div has fluid width. But strangely he code does not wrap so the page is way too whide.

NOTE: the website uses WordPress as a CMS.

I relay cant understand the cause of this problem. What should I change to get the desired result? Thank you!


Solution

  • The issue is actually with your content. When I look at the html in the dev tools inspector, it looks like this:

    HTML showing non-breaking spaces between workds

    Those &nbsp - 'non breaking space' - tags render as if they were normal spaces, but they don't allow the line to break. You need to convert those  s to normal space characters. A text editor's find/replace tool can help you here, or you may be able to do it programmatically depending on your site's backend.