Too much whitespace around new WordPress 3.5 galleries (8 posts)

  1. londoneer
    Posted 3 years ago #

    Hi folks, I don't know whether this is an issue that's specific to the theme I'm running or whether it's more general, but I find that there's far too much whitespace separating the images in a gallery from the text around it after the upgrade.

    Is anyone else experiencing similar issues? I think that all the unnecessary whitespace looks really ugly.

  2. Perhaps you can reduce the whitespace by changing the number of pictures per row?

    If you can provide a link to your site and more specifically to the page where this is happening we can see if there's anything that can be done with CSS.

  3. londoneer
    Posted 3 years ago #

    Thanks Christine, here's an example - as you can see there's an ugly amount of whitespace below the line of images...


  4. WPyogi
    Forum Moderator
    Posted 3 years ago #

    @londoneer, you have a bunch of extra HTML code underneath the images.

    <br style="clear: both">
    <br style="clear: both;">

    Not sure why, but those break tags are what is causing the extra space.

  5. Ah yes, I see what you mean. When I look at the source code too, I can see that the paragraph above and below are not well formed.

    What I would do is go in the admin, go to that post and then click the HTML view.

    Find the sentence
    "buildings in Ilford and Woodford Green which were destroyed by enemy action."
    and make sure that there's a break after it and then the gallery shortcode, which will look something like:

    [gallery=id something ]

    Make sure that you leave a clean space after it and then have the next paragraph. I think that should do the trick.

  6. londoneer
    Posted 3 years ago #

    OK WordPress is introducing the break tags *after* after I've posted the article.

    If I look at the HTML version of the post everything is perfectly clean. There are no extra break tags - nothing... I'm stumped.

  7. Yes, these break tags can be annoying. Sometimes, you just have to fiddle with the HTML view.

    So there will be a difference between.


    and again



    You should go in the settings too under Writing and mark " WordPress should correct invalidly nested XHTML automatically" as checked. Perhaps that will clean it up.

  8. londoneer
    Posted 3 years ago #

    Thanks Christine, I'll give that a try - it's the first time I've seen that radio button and I've wondered for a while what it might do. I'll let you know whether it solves the issue!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.