- This topic has 13 replies, 2 voices, and was last updated 1 year, 10 months ago by Ying.
-
AuthorPosts
-
June 13, 2022 at 10:17 am #2252271Anthony
Hello,
Is it possible to get one of my sidebar boxes to have this type of styling? I am using content aware sidebar to only show related post by category. That is the box I would like to style.
I added the image in a word doc file.
I cant seem to get the spacing and the dividing lines. They can be thin gray solid line. They do not have to be dotted. Not sure what CSS I should use for this.
Thanks again.
Anthony.
June 13, 2022 at 11:25 am #2252328YingStaffCustomer SupportHi Anthony,
Can you link us to your site and point us to the sidebar section where you want to style?
June 13, 2022 at 11:37 am #2252347AnthonyHi Ying. Sure.
Here is a page from my category that will have that box.
https://mobilitymedicalsupply.com/best-manual-wheelchairs/
Sidebar box says: Manual Wheelchair Guides
June 13, 2022 at 11:52 am #2252363YingStaffCustomer SupportTo add number before the titles:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:nth-child(1) a:before { content: "1"; } .sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:nth-child(2) a:before { content: "2"; } .sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:nth-child(3) a:before { content: "3"; } .sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:nth-child(4) a:before { content: "4"; } .sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:nth-child(5) a:before { content: "5"; }
To style the numbers:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li a:before { margin-right: 20px; font-size: 25px; color: grey; }
To change the title color to black:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li a { color: black; }
To add underlines to titles:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 2px dotted lightgrey; }
June 13, 2022 at 12:06 pm #2252376AnthonyOkay thanks Ying. I can drop this CSS into Additional CSS field? Appearance -> Customize -> Additional CSS?
June 13, 2022 at 12:29 pm #2252395YingStaffCustomer SupportYes, correct ๐
June 13, 2022 at 12:38 pm #2252404AnthonyOkay I dropped that CSS code in. I don’t see any changes. I cleared my Cache. Maybe I got something wrong? Is this because I am using the Content aware sidebar plugin to show posts that belong to certain category?
June 13, 2022 at 2:08 pm #2252475YingStaffCustomer SupportDo you have any other CSS in the additional CSS field?
If so, can you add my CSS to the top of the field before other CSS?
June 13, 2022 at 2:10 pm #2252478AnthonyI do have a little. Okay let me try.
June 13, 2022 at 2:12 pm #2252481AnthonyThat fixed it. Thank you again Ying.
June 13, 2022 at 2:20 pm #2252489AnthonyThanks Yin for the help. One last thing. Is there a way for me to make the links bold and font larger and when you hover over them they turn blue? In the text CSS can get the text so it does not go under the number for longer titles? So it stays in line with the beginning of the link?
You see 3, 4, and 5 how they go under the number?
https://mobilitymedicalsupply.com/heavy-duty-manual-wheelchairs/
June 13, 2022 at 3:12 pm #2252516YingStaffCustomer SupportHover title color:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li:hover a { color: #1e73be; }
Change this CSS:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li a { color: black; }
to:
.sidebar ul.wp-block-latest-posts__list.wp-block-latest-posts li a { color: black; font-size: 1.2em; display: flex; align-items: center; }
June 13, 2022 at 3:28 pm #2252527AnthonyPerfect. Thanks Ying for all the help! We can close this if need be.
June 13, 2022 at 3:31 pm #2252528YingStaffCustomer SupportYou are welcome ๐
-
AuthorPosts
- You must be logged in to reply to this topic.