- This topic has 18 replies, 3 voices, and was last updated 4 years, 9 months ago by
David.
-
AuthorPosts
-
December 29, 2020 at 11:30 am #1598605
Jim
With an image aligned to one side, the text wraps around it. Good.
As you make the window smaller, and there is less space for text, it eventually stops wrapping and pops down below the picture. Also good.
But it seems the threshold for wrapping is too narrow. The text starts to look pretty ugly. Is there a property to adjust that so it stops wrapping with more space beside the picture?
December 29, 2020 at 12:21 pm #1598684Leo
StaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know 🙂
December 29, 2020 at 12:49 pm #1598728Jim
Here’s one example. Just below the “Symptoms” heading starts a series of pictures on the right. The second and later all have a clear_right class so the pics don’t sit next to each other.
Look at the second and later photos, the ones all the same width. It looks fine wide, but as the window gets narrow, first the wrapped text starts to look bad, then portions of it drop down below the pics. Eventually there’s only one line wrapped. Also watch the heading “Distribution and Damage”. At one point you can see it break in two, one part remaining wrapped and the rest dropping down.
https://forestpathology.org/root-diseases/big-pocket/Here’s a simpler example with one pic and no clear_right. See the pic of man with tree below the heading “Multiple Decline Concepts”. Again, as window gets smaller, it starts to look bad, then part of the text drops below and the rest stays wrapped.
https://forestpathology.org/decline-diseases/December 29, 2020 at 5:06 pm #1598865Leo
StaffCustomer SupportHmm this isn’t normal behaviour.
Can you disable WP optimize to test?
December 29, 2020 at 7:23 pm #1598932Jim
Thanks. I deactivated WP-Optimize and checked those pages again – no change. Then I reactivated it – not sure if you meant you wanted to test.
December 29, 2020 at 7:26 pm #1598934Jim
I deactivated WP-Optimize and checked those pages again – no change. Then I reactivated it – not sure if you meant you wanted to test yourself.
December 29, 2020 at 8:31 pm #1598965Leo
StaffCustomer SupportCan you deactivate all plugins except GP Premium and let me have a look?
Thanks 🙂
December 30, 2020 at 7:56 am #1599672Jim
Yes. Please see private info. It doesn’t seem to make any difference.
December 30, 2020 at 8:32 am #1599728David
StaffCustomer SupportHi there,
you could do a couple of things with some CSS:
/* limit image width to 50% of viewport */ .wp-block-image figure.alignright { max-width: 50vw; } /* On smaller screens stack the images */ @media(max-width: 768px) { .wp-block-image.clear_right, .wp-block-image figure.alignright { float: none; margin: 0; max-width: unset; width: 100%; } .wp-block-image figure.alignright img { width: 100%; } }December 30, 2020 at 10:41 am #1599909Jim
Thanks, but I’m a bit confused. Yesterday Leo said this was not normal behavior. I don’t know what normal behavior is. Could you link me to a GP site that has text wrapping around images and works normally?
If mine is not normal, I’d rather find out why than work around it.
December 30, 2020 at 2:46 pm #1600078David
StaffCustomer SupportFloats behaviour can be unpredictable depending on the content around it – for example on this post:
https://forestpathology.org/decline-diseases/
When the screen is narrowed it comes a point where the word ‘acknowledging’ is too wide to fill the remaining space and falls below the image. To stop that from happening would require the word to break and become hyphenated which is not pretty.
The solution i provided is the best way to fix that.
December 30, 2020 at 4:37 pm #1600156Jim
Ok, so it sounds like what I’m seeing is normal behavior after all? I’ll try that css and see how it goes.
December 31, 2020 at 4:00 am #1600502David
StaffCustomer SupportI would prefer to say yes, you’re seeing the ‘weird’ behaviour of floats 🙂
Let us know how the CSS works for you.January 2, 2021 at 10:45 am #1602926Jim
I don’t know why, but each of those two css rules, individually and together, cause a critical error. I double checked the semicolons and braces, all seems right. Strange.
It’s got to be something I screwed up elsewhere in functions.php. I’ll work on it.
DOH! Finally realized I was putting CSS in functions.php!
January 2, 2021 at 12:18 pm #1602993David
StaffCustomer SupportYep – that will break it 🙂
Glad to hear you found the issue – did this CSS resolve the narrowing text problem ? -
AuthorPosts
- You must be logged in to reply to this topic.