[Resolved] item in grid second row sitting right

Home Forums Support [Resolved] item in grid second row sitting right

Home Forums Support item in grid second row sitting right

  • This topic has 7 replies, 3 voices, and was last updated 5 years ago by Tom.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #876436
    David

    Hello

    Any ideas why the second row of this archive page is sitting to the right, instead of flowing underneath?

    Code I have on the archive page is…

    <?php
    /**
     * The template for displaying posts within the loop.
     *
     * @package GeneratePress
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    ?>
    <div class="grid-33">
    <?php $team_member_image = get_field( 'team_member_image' ); ?>
    <?php if ( $team_member_image ) { ?>
    	<a>" alt="<?php the_title_attribute(); ?>"><img />" alt="<?php echo $team_member_member_['alt']; ?>" /></a>
    <?php } ?>
    </div>
    #876449
    David
    Staff
    Customer Support

    The last element in the row needs to clear the floats. by adding a clear: left; property to its CSS.

    #876660
    David

    Any ideas what I’m doing wrong? still looks a mess…

    .team-archive {padding-bottom: 20px;}
    .team-archive:last-child {clear: left !important;}

    #876670
    David
    Staff
    Customer Support

    Sorry – try clear: right; ( i hate floats lol )

    #876679
    David

    Still no luck, top row works fine, then goes all over the place in row 2

    #877045
    Tom
    Lead Developer
    Lead Developer

    Maybe it would be preferable to do this?:

    .post-type-archive-team .site-main {
        display: flex;
        flex-wrap: wrap;
    }
    #877194
    David

    Thanks Tom

    #877504
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.