- This topic has 5 replies, 2 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
January 13, 2023 at 5:22 am #2494108
SUNBIN
I want TOC on left side bar so i read some article and made it like this.
There are 3 classes (table-of-contents, toc-heading, toc-contents)
Because i made Heading and List into group.
So group is table-of-contents
Heading is toc-heading
List is toc-contentsBut,
the style i want is like a table (see * on image)
how can i make it?Here is my style
https://imgur.com/ATBUM71
Here is what i want
https://imgur.com/2rhdt6lThe css i used is (honestly i dont like this style)
.table-of-contents {
padding: 20px;
}.toc-heading {
font-weight: 900;
font-size: 10px;
}ul.toc-contents {
margin-top: 0em!important;
margin-left: 0em!important;
}.toc-contents li {
list-style-type: none;
position: relative;
}.toc-contents a {
font-size: 15px;
color: #000000;
text-decoration: none!important;
}.toc-contents a:hover {
color: #585858;
border-bottom: 2px solid #585858;
}.toc-contents li:before {
content: “➜➜”;
margin-right: 1em;
color: #585858;
left: -30px;
position: absolute;
}January 13, 2023 at 7:57 am #2494379David
StaffCustomer SupportHi there,
can you share a link to a page on your site where i can see the TOC?
January 13, 2023 at 8:04 am #2494394SUNBIN
Sure.
Check pleaseJanuary 13, 2023 at 9:06 am #2494476David
StaffCustomer SupportTry changing your CSS to this:
.table-of-contents { padding: 20px; } .toc-heading { font-weight: 900; font-size: 10px; } .table-of-contents ul.toc-contents { margin-top: 0em; margin-left: 0em; padding: 40px 0; } .toc-contents li:first-child { border-top: 1px solid; border-color: #4444; } .toc-contents li { list-style-type: none; position: relative; border-bottom: 1px solid; border-color: #4444; } .toc-contents a { display: flex; font-size: 15px; color: #000000; text-decoration: none; padding: 10px; } .toc-contents li a:after { content: '➜➜'; margin-right: 1em; color: #585858; margin-left: auto; } .toc-contents a:hover { color: #585858; background-color: #efefef; }January 13, 2023 at 7:08 pm #2494875SUNBIN
Thx david.
It worksJanuary 14, 2023 at 3:37 am #2495108David
StaffCustomer SupportGlad to hear that
-
AuthorPosts
- You must be logged in to reply to this topic.