Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Thanked 0 Times in 0 Posts

    Unhappy Image spacing issues - CSS

    Hey guys,

    1st time poster, hoping you can assistÖ

    Iím working from a WordPress theme called PictureThis and have got a little stuck when editing the CSS code:

    Basically, PictureThis includes the functionality to add a portfolio of images; but, it resizes the images and only part of it is shown. Iíve worked out how to make the image show the whole image, not just a section, but no cannot for the life of me, work out how to move the 2nd row of images down (they just go over the top of each other). See it here: http://gmbo.co.uk/ceegeeagents/range. (itís meant to show the whole t-shirt, not just half of it).

    Iíve copied and pasted thee CSS code for the portfolio below. If anyone could help / point me in the right direction, Iíd be forever thankful!

    Kind regards



    Template Name: Portfolio 3 Column
    get_header(); ?>

    <div id="mainpage">
    <div class="page_content">
    <div class="portfolio_content">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    $lb_gallery = get_post_meta(get_the_id(), 'cg_lb_gallery', true);
    $title = get_post_meta(get_the_id(), 'cg_page_title', true);
    $custom_title = get_post_meta(get_the_id(), 'cg_custom_title', true);
    if($title == "y" || $title == "") {
    if($custom_title != "") { ?>
    <h1><?php echo $custom_title; ?></h1>
    <?php } else { ?>
    <h1><?php the_title(); ?></h1>
    <?php } ?>
    <?php } ?>
    <?php the_content(); ?>
    $portfolio_cat = get_post_meta(get_the_id(), 'cg_portfolio_cat', true);
    $posts_limit = get_post_meta(get_the_id(), 'cg_items_per_page', true);
    <?php endwhile; endif; ?>
    <div id="content-fullwidth-portfolio">
    <ul class="three-column">
    $query = array(
    'post_type' => 'portfoliocpt',
    'posts_per_page' => $posts_limit,
    'taxonomy' => 'portfolio_category',
    'term' => $portfolio_cat,
    'paged' => $paged,

    <?php query_posts($query);
    while(have_posts()) {

    $lbtitle = get_post_meta(get_the_id(), "_lbtitle", true);
    $url = get_post_meta(get_the_id(), "_lburl", true);
    $lbdesc = get_post_meta(get_the_id(), 'lbdesc', true);
    $cg_image_url = get_post_meta(get_the_id(), 'cg_image_url', true);
    $custom_image_url = get_post_meta(get_the_id(), 'custom_image_url', true);
    $thumb = get_post_thumbnail_id();
    $image = vt_resize( $thumb,'' , 253, 300, true, 70 );
    if($url == "") {
    $imgurl = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    } else {
    $imgurl = get_post_meta(get_the_id(), "_lburl", true);
    <div class="portfolio_thumbnail">

    <?php if($cg_image_url == "y" || $cg_image_url == "") { ?>
    <a href="<?php echo $imgurl; ?>" title="<?php echo $lbdesc; ?>" rel="prettyPhoto<?php if($lb_gallery == "y") { echo "[gal]"; } ?>">
    <?php } else {
    if($custom_image_url == "") { ?>
    <a href="<?php the_permalink(); ?>" alt="<?php echo $lbtitle; ?>">
    <?php } else { ?>
    <a href="<?php echo $custom_image_url; ?>" alt="<?php echo $lbtitle; ?>">
    <?php } ?>
    <?php } ?>

    <img style="position:absolute;left:34%;top:20%;" src="<?php bloginfo('template_url'); ?>/images/preview.png" alt="<?php echo $lbtitle; ?>"/>
    <?php echo '<img src="'.$image[url].'" width="'.$image[width].'" height="'.$image[height].'" alt="'.$lbtitle.'" class="front" /></a>'; ?></a>

    <?php } ?>

    <?php wp_pagenavi(); ?>

    <?php wp_reset_query(); ?>
    <?php get_footer(); ?>

  2. #2
    New Coder
    Join Date
    Oct 2011
    Thanked 0 Times in 0 Posts
    Hi, I would suggest adding this to the parent div of your image thumbnail row class:


  3. #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Thanked 1,874 Times in 1,858 Posts
    Hello wlinard,
    You set the element that contains that image at too small a height.
    Try changing your CSS to match this -
    ul.three-column li .portfolio_thumbnail {
        height: 300px;
        position: relative;
        width: 253px;
    Not sure what clear:bottom; is going to for you... http://www.w3schools.com/cssref/pr_class_clear.asp Valid property values for clear would be left, right, both, none and inherit.

    When posting code in the forum, please use the code tags, &#91;code&#93;&#91;/code&#93; - available with the # button in the post edit window.
    This will wrap your code in a scroll box which greatly helps the readability of your post.
    The link is plenty of information though, we can get both markup and CSS from that.
    Last edited by Excavator; 01-04-2012 at 08:01 PM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use a DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts