• Resolved boppar

    (@boppar)


    Hi there.
    I’m a Storefront user. I’m not sure this issue is theme related or not.

    On my homepage I use cover image blocks showing 4 categories. Each cover image block has one button and also text field. The problem is that when the button and the text field are aligned center they cover the center of the image.

    I would like to align the text field to the top center and the button to the bottom center. This image explains what i want to achieve:
    https://ibb.co/rtM5vbm

    Is there a way to solve this?
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi there @boppar ????

    OK, so if I am getting this right you would like to move the button to the top of that cover and the text to the bottom.

    The first step would be to resort the items within the block. Please have a look at the animated GIF below.

    Resorting
    Link to image: https://d.pr/i/S4IuEy

    Once you have resorted them you would need to apply CSS styling to move the button to the very top and the text to the end.

    Let us know if this solves your question or if you need any further help.

    Cheers!

    Thread Starter boppar

    (@boppar)

    @danielinhou
    Of course I know how to move the button below the text. ??

    OK, so it’s possible to move the the text to the very top and the button to to the end using CSS styling.

    The problem is that I can’t figure out what CSS I need to apply. Any suggestion?

    Thread Starter boppar

    (@boppar)

    @danielinhou
    Hi Dani.
    I’m still struggling to find CCS to move the text to the very top and the button to to the end. No success so far. It would be great if you have any suggestions.

    Thread Starter boppar

    (@boppar)

    It would be wonderful of some of the staff of this great theme could help out.
    Thanks in advance!

    Hi, @boppar!

    Sorry for the lack of responses here as this one was a little trickier to figure out.

    Can you please try the following CSS?

    @media only screen and (min-width: 768px) {
    	.wp-block-cover__inner-container h2 {
    		position: relative;
    		top: -100 px;
    	}
    
    	.wp-block-cover__inner-container div {
    		position: relative;
    		bottom: -100 px;
    	}
    }
    Thread Starter boppar

    (@boppar)

    @dcka
    Hi Cara.

    I really would like this to work.
    I tried your CSS, but unfortunately nothing changed.

    Sorry about that, @boppar! Let’s try again. Please replace the code I previously provided with the following:

    @media only screen and (min-width: 768px) {
    	.wp-block-cover .wp-block-cover__inner-container h2 {
    		position: relative;
    		top: -100px;
    	}
    
    	.wp-block-cover .wp-block-cover__inner-container .wp-block-buttons {
    		position: relative;
    		bottom: -100px;
    	}
        
        .wp-block-columns .wp-block-cover .wp-block-cover__inner-container .wp-block-buttons {
            bottom: initial;
        }
    }
    Thread Starter boppar

    (@boppar)

    @dcka

    Hi Cara. I really appreciate your help. Unfortunately this CSS didn’t change anything.

    Hi, @boppar!

    I just checked your site, and I do see changes there:


    Link to image: https://d.pr/i/2UsDnc

    To note, however, the code I provided will only work on screens that are at least 768px in width. You can adjust that to be smaller or larger, but we recommend 768px.

    If you’re still not seeing the change, can you please check on your browser’s incognito window?

    Thread Starter boppar

    (@boppar)

    Hi @dcka

    It works on the top image, but not on the five images below (the categories).
    https://ibb.co/Tv5H6SF
    Do you have any idea why it’s like that?

    Oh, I thought you only wanted it on the main image, and not the categories.??

    In that case, please try this:

    @media only screen and (min-width: 768px) {
    	.wp-block-cover .wp-block-cover__inner-container h2 {
    		position: relative;
    		top: -100px;
    	}
    
    	.wp-block-cover .wp-block-cover__inner-container .wp-block-buttons {
    		position: relative;
    		bottom: -100px;
    	}
        
        .wp-block-columns .wp-block-cover .wp-block-cover__inner-container p {
            position: relative;
            top: -100px;
        }
        
        .wp-block-columns .wp-block-cover .wp-block-cover__inner-container .wp-block-buttons {
            bottom: -100px;
        }
    }

    Hi, @boppar!

    We haven’t heard back from you in a while, so I’m going to mark this thread as resolved. However, we’ll be here if/when you’re ready to continue.

    Thread Starter boppar

    (@boppar)

    @dcka

    Hi Cara.
    Sorry for not responding before (been away on a trip). It works great!
    Thank you for taking time and helping out.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Align text to top and align button to bottom in a cover block. Possible?’ is closed to new replies.