Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Small CSS help on mobile

  • Hi guys,

    I didn’t like the default indentation for lists on generatepress on mobile (the indent is massive, forcing text to wrap too much), so I changed the CSS on mobile to remove the left margin using,

    
    ul{
    	@media(max-width: 768px) {
    	margin-left: 27px;
    		}
    }

    This has got my in-article lists looking spot on, but has effected the pros/cons custom block (only on mobile) I’ve setup using GenBlocks,

    View post on imgur.com

    I’ve corrected the first product’s pros/cons block, but all the other ones across my site are now like this. See the rest of this article for examples: https://a1athlete.com/best-vertical-jump-programs/

    I was wondering if you could find me the CSS class for the Pros/Cons container so I can quickly add some CSS to fix the mobile indentation in these blocks across the site?

    Thanks so much <3

  • Hello Harvey,

    To clarify, do you want to decrease the space within the dot and the text or do you want to decrease the space before the dot?

  • Hey mate, I wanted to decrease the indentation of the default lists on GPress… and I’ve done that. But now I want to reverse it for the Pros/Cons block, so shift the text to the right (so that it’s inside the box).

  • Try replacing the code you have with this:

    @media (max-width: 768px){
        .entry-content ul:not(.post-content){
            margin-left: 27px;
        }
    }
  • That didn’t work unfortunately, it’s also reset the regular indentation to the default:

    View post on imgur.com

    To confirm, I want the modify the above indentation, not the indentation in the GenBlock.

    Cheers

  • How are you adding the CSS? Do you have an optimization/caching plugin? Can you disable that first?

  • I’m just using the Additional CSS in Customize.

    Note your solution DID change something on the page (it pulled the Pros/Cons text back into the box, which I wanted), but it also pulled the normal lists back to their heavily-indented position.

    So I’m pretty certain caching isn’t the issue.

  • For reference, can you take a screenshot of a list it’s not working on but should?

  • Yeah I included one earlier but here’s another (on that same page),

    View post on imgur.com

  • It should work on that. See: https://share.getcloudapp.com/v1uPkqjO

    I’m thinking there’s a Syntax Error somewhere on all your CSS. I was going to check but I can’t see the CSS on your site which is why I was asking to disable caching/optimization plugins.

  • Oh my bad man, I had the @media tag inside of a ul{}, so I removed it and it works perfectly.

    You’re a G, Fernando!

  • You’re welcome, Harvey!

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