| 
 | |||||||
|  | 
|  | Thread Tools | Search this Thread | 
|  09-16-2022, 07:32 AM | #1 | 
| Enthusiast  Posts: 33 Karma: 10 Join Date: Sep 2022 Device: Microsoft Surface Pro 7, Apple iPad |  How to style (CSS) Custom columns/fields in Book details pane? What are their IDs? 
			
			Under Preferences > Look & feel > Book details > Text styling it appears you can style the content shown in the Book details pane. This is what I am referring to: I am looking to style a custom column/field and its content in the Book details pane (called Filenames2 (#filenames2)). It looks like this (and is based on the help received from our members here): But I don't know what their HTML ID attribute values are so I can use them and style them using CSS. Also, I cannot be sure what their HTML markup looks like. I tried a couple, and neither is working: Code: #_filenames2 ul,
#_filenames2 ul li {
    padding-left: 0;
    margin-left: 0;
    text-indent: 0;
}
#_filenames2 li {
    user-select: all;
}Code: ul,
ul li {
    padding-left: 0;
    margin-left: 0;
    text-indent: 0;
}
li {
    user-select: all;
}Last edited by 01100001; 09-16-2022 at 07:35 AM. | 
|   |   | 
|  09-16-2022, 07:43 AM | #2 | 
| creator of calibre            Posts: 45,600 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			The example tell you everything you need to know. The ids for custom columns are underscore + field name. And classes are based on column datatypes. I suggest you first try styling a simple custom column. | 
|   |   | 
| Advert | |
|  | 
|  09-16-2022, 09:56 AM | #3 | 
| Enthusiast  Posts: 33 Karma: 10 Join Date: Sep 2022 Device: Microsoft Surface Pro 7, Apple iPad |   
			
			So what I was already doing (as seen in the first example). It wasn't working because Calibre uses QT-specific CSS property for indentation -qt-list-indent. Thanks to this link @kovidgoyal had shared in an older post showing all supported HTML Tags & Attributes and CSS Properties & Selectors: https://doc.qt.io/qt-5/richtext-html-subset.html That clears things up. I will have to find some other way to sort my issues. Thank you! Edit to clarify: The CSS property user-select isn't supported. Last edited by 01100001; 09-16-2022 at 10:00 AM. Reason: clarification | 
|   |   | 
|  09-16-2022, 10:56 AM | #4 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 Code: program: j = ''; for i in $tags: j = j & '<tr><td>•</td><td><a href="' & re(i, '"', '"') & '">' & i & '</a></td></tr>' rof; if j then '<table>' & j & '</table>'else '' fi; Last edited by chaley; 09-16-2022 at 11:09 AM. Reason: Forgot the </tr> on the original template. Corrected. | |
|   |   | 
|  09-16-2022, 11:06 AM | #5 | 
| Enthusiast  Posts: 33 Karma: 10 Join Date: Sep 2022 Device: Microsoft Surface Pro 7, Apple iPad | 
			
			Ha, good idea! Thanks!
		 | 
|   |   | 
| Advert | |
|  | 
|  | 
| Tags | 
| caibre, calibre 6.4, css, custom columns, look & feel | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Custom Columns edit fields | bgaugler | Library Management | 8 | 03-29-2019 11:00 PM | 
| Book Details Pane Missing | RainIntoRainbows | Calibre | 3 | 08-15-2018 02:41 AM | 
| book details pane | tracis035 | Calibre | 7 | 11-04-2016 12:00 AM | 
| Custom Column (Synopsis) shows in Book Details Pane! Great! | 1611mac | Library Management | 0 | 06-07-2011 12:37 PM |