Howdy @fra_fantasy,
Thanks for writing in! There are a couple of things you’ll want to make sure to adjust:
First, if you haven’t reviewed our online documented examples of how to use the shortcodes, you will want to check that out here: http://demo.theme.co/integrity-1/shortcodes/recent-posts/. As you can see, the only valid values for the count parameter are 1, 2, 3 and 4. These not only output the amount of posts desired, but are also used to output the proper classes used to style the shortcode correctly. The first thing I would do is completely remove your custom CSS and input a proper value for the count parameter and start there. You should find that your shortcode will look great and respond properly with nothing else to do. From there, you can make adjustments as you see fit, but I would personally recommend avoiding any of the responsive styles such as removing side margins from the items, as those change depending on the number of posts you use.
Second, if the look you’re trying to go for is a list of posts vertically and having that centered on your page, you can do that easily by changing the orientation parameter’s value to vertical, which will layout your items vertically as opposed to horizontally, and then using the following CSS (using whatever additional custom class you want):
.x-recent-posts.custom-class {
max-width: 500px; /* change this to whatever you want */
margin-left: auto;
margin-right: auto;
}
Third, I see that you have a custom class of .the-class added to your Raw Content Element, but you have included the . before the class name. This is invalid syntax, and this class will not take effect on your Element because of it. When adding classes to an element, just add the class name (e.g. the-class in this case). When you are styling a class, that is when you will use the dot syntax to target the element (e.g. .the-class) as the dot represents a class in CSS.
Fourth, while you can certainly use a Raw Content Element to hand write in a shortcode, you can also choose to just drag in the “Classic Recent Posts” Element into your content and style it from there. This is more tightly integrated and will give you a simpler interface to work with. You should be able to do everything you’re trying to do with simpler markup and a simpler layout because of this. Just something to think about as you move forward with any customizations.
Hopefully that helps to point you in the right direction, cheers!