I am a beginner in wordpress, and I am having a problem creating custom CSS code to edit a button on a card. I would like to align the "Read more" button in the center of the post card and add borders to it, but in elementor, I’m not getting it. I tried editing custom code just for the attribute where the button is, however, it changes the whole card and centers both the text and the description.
Currently my result is as in the image below.
I would like to leave it like this:
I tried to create a custom code, but I am a CSS beginner, and it is changing all the title, description and the button, here is my code:
a.elementor-post__read-more {
width: 100%;
color: #000;
text-align: center;
background-color: #ffd9d9;
border-radius: 6px;
margin-top: auto;
}
2
Answers
The
a
is unneccessary in finding the element, you should just use the class,.elementor-post__read-more
.If it still applies to all title, description and button elements search for all instances of
elementor-post__read-more
as a class insode the page to see if see other elements will be affectedYou can try this CSS!!
.elementor-post__read-more {
}
.elementor-post__read-more:hover {
}