selecting the table title

Post here questions and problems related to editing and publishing DITA content.
mrpaultracey
Posts: 12
Joined: Thu Jun 01, 2017 2:10 pm

selecting the table title

Post by mrpaultracey »

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: 828
Joined: Mon Dec 05, 2011 6:04 pm

Re: selecting the table title

Post by Costin »

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 »

thanks a lot, makes sense!
--
Paul
Post Reply