selecting the table title

mrpaultracey
Posts: 12
Joined: Thu Jun 01, 2017 2:10 pm

selecting the table title

Post by mrpaultracey » Mon Dec 17, 2018 2:30 pm

Hi all
I've been scratching my head a bit about how to select the table title. Running "Other techniques", kindly provided in the debugging CCS section, to highlight the names I get the following:

caption[ class= ''] Table 1. span[ class= '- topic/title title'] This is a Test Table

My guess it starts like the following, but having tried many variations, I cant seem to select it:

*[class ~= "topic/table"] >


Would be wonderful if you could tell me from this example, thanks a lot!

Costin
Posts: 659
Joined: Mon Dec 05, 2011 6:04 pm

Re: selecting the table title

Post by Costin » Tue Dec 18, 2018 1:40 pm

Hi mrpaultracey,

First, I want to make you aware that the classes in the WebHelp output are not the same with the ones defined in the DITA source files.
You should use the CSS inspector of your internet browser to inspect styles for a specific element and find its specific selector.
For example, you can notice that, the title of a table is a "span" element, which has a "title" class and is a child of an element that has the "table" class.
Given this, to match only the title of a table, you could use a selector like:

Code: Select all

*[class~="table"] span[class~="title"]
The same way you could select the entire table caption, that contains both the table title and the label in front of a table title.
For this, you could use another selector (the CSS inspector helps in identifying this as well):

Code: Select all

*[class~="table"] > caption
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

mrpaultracey
Posts: 12
Joined: Thu Jun 01, 2017 2:10 pm

Re: selecting the table title

Post by mrpaultracey » Wed Dec 19, 2018 1:08 pm

thanks a lot, makes sense!
--
Paul

Post Reply