Read the statement by Michael Teeuw here.
Changing table cell in calendar module using custom.css
-
-
@evroom also, your screen shot says it
when there is no space between the elements in a selector clause,
that mean they ALL MUST be present on AN elementwith space they must be in the same element TREE (notice the space after …Tomorrow and before td)
so that means
a tr (table row) element (no . in front) AND a dateheader (class .) AND a normal(class .) AND a dayAfterTomorrow (class .) followed by a td (table/column/data) element -
parens, not braces
Yes, those who can read have a clear advantage. :-)
$('.calendar tr .dateheader.normal.dayAfterTomorrow td') null $('.calendar tr.dateheader.normal.dayAfterTomorrow td') <td colspan="3" style="padding-top: 10px;">Nov 15th 00:00 </td> $('.calendar .dateheader.normal.dayAfterTomorrow td') <td colspan="3" style="padding-top: 10px;">Nov 15th 00:00 </td>
custom.css:
.calendar .dateheader.normal.dayAfterTomorrow td { padding-top: 0px; } .calendar tr.dateheader.normal.dayAfterTomorrow td { padding-top: 0px; }
Both do no work.
Either the selection is wrong, or perhaps it has to do with
style="padding-top: 10px;"
.
Or both.Will continue tomorrow.
E.J.
-
@evroom can u see the custom.css styles selected in the right window on the dev window elements tab?
that will prove that the selector clause worked (or not) -
Yes, I can:
But is stricken through.
So somebody high-jacked it probably.Look like I am going somewhere, but now the finishing touch.
-
ok, the selector is good
that typing at the top has replaced it
but CSS selects the style that is MOST specific…
yours might not be vs the style ON the element
you can override by adding !important
.calendar tr.dateheader.normal.dayAfterTomorrow td { padding-top: 0px !important; }
-
That did the trick !
I must say that the Elements tab is confusing, as it looks like the value did not change.
Probably this is the state before custom.css is applied.
The padding has gone (this was my goal):
An additional question.
How to change the class, as in this example ?$('.calendar table') <table class="xsmall"><tr class="dateheader normal dayAfterTomorrow"><td colspan="3" style="padding-top: 10px;">Nov 15th 00:00 </td></tr><tr class="event-wrapper normal event dayAfterTomorrow"><td> </td><td class="title bright align-left" colspan="2">TestCal: All day event</td></tr></table>
.calendar .table { class: "small" !important; }
It says
Unkown property name
, which makes sense.
E.J.
-
@evroom you cannot add or change a classname string
class=“foo”
to add “bar” class too
class =“foo bar”but you CAN change the behavior of the other classes to match what adding another class could do
OR , you could add the styles to the ELEMENTS you WOULD have added the bar class to…
just_have_to_select_them {
styles
}as an example of a complex selector in my MMM-Config, I want to hide an element on a library generated element
.possibly-hidden-tab div:nth-child(2) > div > div >div >ul >li:only-child >a[rel*="Item%201"] { display: none; }
this is
elements with the possibly-hidden-tab class
its second child div
its immed child div
its immed child div
its immed child div
its immed child ul
its immed only child li
with an a element containing a rel attribute value of “Item 1”
(spaces have to be encoded, but for clarity I left it out here)