Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Table of content customize

serc
Contributor
February 18, 2019

Hi guys,

i'm currently trying to create a css class for a TOC but something i'm doing wrong.
i have inserted this code as an example:

TOC without my class:

bild1.PNG

div.tableOfContent

{

text-color:black;

}

bild3.PNG

result looks like this:

bild2.PNG

can anyone tell me what I did wrong?

5 answers

1 vote
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

With Confluence styling, you need to use the inspect function of the browser to see the rule that is being used. In the case of the ToC, it is using a high-level rule to style ALL links:

.wiki-content a, .wiki-content a:link, .wiki-content a:visited, .wiki-content a:focus, .wiki-content a:hover, .wiki-content a:active {
color: #3572b0;
}

So in your case, you need a rule that selects only your ToC

.wiki-content .tableOfContent a {
color: #030303;
}
0 votes
serc
Contributor
February 19, 2019

anyone else has some ideas :D?

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2019

Hi @serc !

Have you tried the solution provided by @Bill Bailey ? It's on top now.

serc
Contributor
February 19, 2019

yes i add this:

.wiki-content .tableOfContent a {
color: #030303;

but nothing change, always the discs 

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2019

Hi @serc 

Endlich :)

I've had time to reproduce the situation in my environment. @Bill Bailey 's solution actually works.

Here's the parameters:

stylesheet.jpgtoc1.jpgtoc2.jpgresult.jpg

As you can see - works for me.

Try to reproduce it and get back to us with the results.

Will wait for your answer.

Like serc likes this
serc
Contributor
February 19, 2019

Okay I will try to clear all css styles and only implement this for the TOC, propably some other configs has some bugs. I will let you know about the reason! 

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2019

Good

0 votes
serc
Contributor
February 18, 2019

i can change the color with

.toc

{

color:black;

}

but if i do this, the decimal count get changes with the discs

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Ok, let's see all the styling/code of this block. Maybe we should reproduce something as well to get the numbers.

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Oh, I'm sorry.

According to this:

Table of Contents Macro

We just need to change the list style. Doesn't it work?

serc
Contributor
February 18, 2019

für das inhaltsverzeichnis habe ich nur die oben dargestellte einstellung. muss ich alle anderen auch definieren?
if yes, like this?

.toc

{

color: black;

style: decimal;

}

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Hast du das schon versuchen, oder?

serc
Contributor
February 18, 2019

yes, it doesnt work :(

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

I'm sorry I don't have access to my environment now.

If it's not so urgent I can test it later.

Geht es?

serc
Contributor
February 18, 2019

i have some hours, that would be really nice!

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Have you checked this:

number.jpg

serc
Contributor
February 18, 2019

yes, the result looks like this:bild4.PNG

Like Grigory Salnikov likes this
serc
Contributor
February 18, 2019

dont know how can i delete this disks

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Try to set this parameter as well:

List Style.jpg

serc
Contributor
February 18, 2019

i do but same result

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

It's strange because it works in my environment:

example_TOC.jpg

I don't use CSS-styling, though.

serc
Contributor
February 18, 2019

yeah if i dont use a css styling it works too, but i need to change the text color to black :(

Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Try to change your CSS:

.toc a
{
color:black;
}
serc
Contributor
February 18, 2019

class name is toc or a?

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

No, just add "a" after the class-name you use (whatever it is). This way we refer to links.

serc
Contributor
February 18, 2019

dont work, always the black disks

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Try to add

style:none
serc
Contributor
February 18, 2019

nothing change :D, its really crazy...

Like Grigory Salnikov likes this
0 votes
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Oh, try also the method described here:

Table of contents is changing color

May it be the case?

serc
Contributor
February 18, 2019

i try it but it doesnt work

Like Grigory Salnikov likes this
0 votes
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2019

Hi @serc !

I think these are also links. So we should change their color too.

serc
Contributor
February 18, 2019

but how?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events