css problem (?) in 1.4 beta

css problem (?) in 1.4 beta

by Przemyslaw Stencel -
Number of replies: 2

I've had a problem with my custom them after upgrade to 1.4 beta. I'm not sure if it's a bug or something I did wrong in my theme.

I used to have color property defined for sideblockheading class:

.sideblockheading {
color: <?PHP echo $THEME->color2?>;
background-color: <?PHP echo $THEME->color1?>;
}

(color1 - dark green, color2 - white)

After the upgrade, the color property is ignored and I ended up with dark green text on dark green backround (see attached screenshot)

I compared the source of the page in 1.4 and in 1.3 and it seems that the problem is due to the fact that <thead> tag has been introduced and the sideblockheading class is not attached to <td> like it was in 1.3.x, but to <thead>:

It was:

<table class="sideblock" width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="sideblockheading" bgcolor="#FFFFFF">

Now it is:

<table style="width: 100%;" cellspacing="0" cellpadding="5" id="block_participants" class="sideblock">
<thead class="sideblockheading">
<tr>
<td>

After some experiments, I used the following workaound (in styles.php):

.sideblockheading div {
color: <?PHP echo $THEME->colour2?>;
}

but this works only because the text inside that table cell is enclosed within a <div>. I'd appreciate any help on how I should do it properly.

Attachment sideblockheading.gif
Average of ratings: -
In reply to Przemyslaw Stencel

Re: css problem (?) in 1.4 beta

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm happy to move it back to the <td> ... PJ, is that OK?
Average of ratings: Useful (1)
In reply to Przemyslaw Stencel

Re: css problem (?) in 1.4 beta

by David Scotson -
I'd support switching it back as the THEAD tag isn't really adding much here, as it is intended for long tables where you might want the heading to be repeated (on every page of a print out perhaps) and is very poorly supported anyway.

It might make slighly more sense to swap the TD (table data) tag for a TH (table header) tag but it's not essential either.