Looking for a way to center featured blog on homepage for DEBUT theme

Highlighted
New Member
25 0 0

Hey.

Can anyone help me with centering content for featured blog on my homepage?

I already added possibility to add only 1 blog post but i cant make it centered.

https://enammo.com/

Also would like that it shows good both on desktop and mobile.

0 Likes
Excursionist
31 0 3

Show HTML <>

-----------------

<div align="center">
<center> YOUR CONTENT GOES HERE </center>
</div>

0 Likes
Highlighted
Tourist
12 0 0

This doesn't seem to work for the Brooklyn theme :(


0 Likes
Highlighted
Tourist
12 0 0

.featured-blog__post {
float: center;
margin-bottom: 0;
justify-content: center;
text-align:center;
}

 

This seemed to work.

0 Likes
Highlighted
New Member
25 0 0

it did not work for me either.

where did you placed this code?

0 Likes
Highlighted
Tourist
12 0 0

It can be simplified to just this:

 

/*======== Center Blog Writing on Home page - February 14, 2020 =============*/

.featured-blog__post {
text-align:center;
}

 

You need to add it to the bottom of theme.scss.liquid, which you will find under assets in the edit code section.

 

Note - I'm using Brooklyn. Hope it still works for you!

 

0 Likes