We're merging with GenerateBlocks! Learn more here.

[Resolved] Lists without images

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Lists without images

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23047
    Bernhard
    Participant

    Hello,
    I want to create lists without images but there is something like 200 px between the links and an indent. How can I eliminate all these spaces and define border boxes with a unique height for all of maybe 3em?
    Thank you

    #23137
    David Beckwith
    Participant

    Hi there,

    deactivate the Card option on that List as its not required but it adds an additional container that its own padding.

    #23139
    Bernhard
    Participant

    Hi David,
    done. The indent is away now but there is still too much space between the rows.

    #23186
    Leo
    Moderator

    Give this CSS a shot:

    .entry-content .wp-show-posts-entry-title {
        min-height: unset;
    }
    .entry-content .wp-show-posts:not(.wp-show-posts-columns) .wp-show-posts-single:not(:last-child) {
        margin-bottom: 0.5em;
    }
    #23205
    Bernhard
    Participant

    Hello,
    this works so far 🙂
    I want to give it the css class bottomlist , how can I do that?

    For the border, I used

    .bottomlist .wp-show-posts-inner {
    	box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75);
    }

    Seems to be ok both on desktop and mobile.

    #23407
    elvin
    Moderator

    Hi,

    While there’s no straightforward PHP filter to add the classes in, we can still do it w/ JavaScript.

    Try this JS script:

    <script>
    function wpsp_add_inner_class(){
      var wpspList = document.getElementById('wpsp-4447');
    	var innerList = wpspList.querySelectorAll('article.post > div.wp-show-posts-inner');
    	for(i=0;i<innerList.length;i++){
    		innerList[i].classList.add('bottomlist');
    		console.log('works');
    	}
    }
    
    window.addEventListener('DOMContentLoaded', (event) => {
    	wpsp_add_inner_class();
    	console.log('works');
    });
    </script>

    Replace wpsp-4447 with your WPSP id.

    #23457
    Bernhard
    Participant

    Ok, thank you 🙂 .

    #23468
    elvin
    Moderator

    Ok, thank you 🙂 .

    No problem. 🙂

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