- This topic has 13 replies, 3 voices, and was last updated 3 years, 7 months ago by David.
-
AuthorPosts
-
August 26, 2020 at 8:46 am #1419194Anonymous
Hello,
I am looking to do on my post listing for category name to appear like the web bellow, if you scroll a bit down you will see category Planes, Estilo, etc and placing category name inside a blue line, how can I achieve that for my website?
Thanks!
Sara
August 26, 2020 at 9:47 am #1419298LeoStaffCustomer SupportHi there,
It’s using HTML structure with CSS like this:
https://www.screencast.com/t/6ocM2re8B8If you right-click on the element and use the browser inspection tool then you can copy exactly what they’ve done.
August 26, 2020 at 10:09 am #1419336AnonymousOk and where I place this code in additional CSS? is only css code?
August 26, 2020 at 10:11 am #1419339LeoStaffCustomer SupportYup additional CSS should work.
August 26, 2020 at 11:37 am #1419451AnonymousWhat is the name of the CSS ID or Class I need to place this code bellow:
font-family: Oswald,Sans-serif; font-size: 1.5rem; line-height: 1.4; display: inline-flex; position: relative; font-weight: 400; text-decoration: none; text-transform: uppercase; width: 100%;
Is this code correct or do I need to add any more code? what about line color?
August 26, 2020 at 11:45 am #1419466LeoStaffCustomer SupportThat’s not the code I’m showing the screenshot here:
https://www.screencast.com/t/6ocM2re8B8Again if you right-click on the element and use the browser inspection tool then you can copy exactly what they’ve done.
The selector depends on what you are adding it to.
Can you link me to your current set up?
August 26, 2020 at 12:06 pm #1419495AnonymousI just placed my website link in textbox on first post, can you tell me where I should place code you show on screenshot? Thanks!
August 26, 2020 at 1:28 pm #1419565LeoStaffCustomer SupportWhich title are you trying to add the line?
The
<h1>
Bienvenid@s a nuestra página para amantes de la belleza! ?CSS can be added using one of these methods:
Adding CSS: https://docs.generatepress.com/article/adding-css/August 26, 2020 at 2:10 pm #1419596AnonymousHello Leo,
I am trying to add the line and style to the h2 ones which are “Ultimo en Cabello” and “Ultimo en Salud”.
August 27, 2020 at 3:41 am #1420109DavidStaffCustomer SupportHi there,
try adding this CSS:
.ruled-heading { display: grid; grid-template-columns: 40px auto 1fr; align-items: center; } .ruled-heading:before, .ruled-heading:after { content: ''; display: block; height: 4px; width: calc(100% - 15px); background-color: #00F; } .ruled-heading:after { justify-self: end; }
Then you will need to give the H2 element a CSS class of
ruled-heading
August 27, 2020 at 4:02 am #1420134AnonymousDoes not seem to be working David, Where is that style showing? Because I am using WP Show Posts to list posts and title is coming from h2 text.
Thanks!
August 27, 2020 at 5:01 am #1420194DavidStaffCustomer Supportedit the Heading in you the text editor it will look like this:
<h2>Ultimo en Cabello</h2>
change it to:
<h2 class="ruled-heading">Ultimo en Cabello</h2>
September 4, 2020 at 10:40 am #1431067AnonymousPerfect David Thank you!
September 4, 2020 at 4:44 pm #1431327DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.