Site logo

Archived topic

item in grid second row sitting right

7 replies · Started by David on April 23, 2019

Viewing posts 1–8 of 8

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>

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

Any ideas what I'm doing wrong? still looks a mess...

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

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

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

Maybe it would be preferable to do this?:

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

Thanks Tom

No problem :)

This archived topic is closed to new replies.