Forum Bugs

Float: top cannot be overridden

ThePrintingSquirrel
I have a table wrapper like this:
<div class="box-table"><table... </table></div>

My default styling is
.box-table {
	float:top;
	column-span: all;
}

Now I want to override this for specific tables:
<div class="box-table box-table2"><table... </table></div>

.box-table2 {
	float: column-bottom;
	column-span: none;
}

The latter styles are not applied, not even with "important" or if I increase specificity.
There is another bug related to these properties.

Can you please check? I'm using Prince 12.4.

Thank you.

Edited by ThePrintingSquirrel

mikeday
That doesn't sound right, can you try applying a color or background-color for these classes as well to double check?
ThePrintingSquirrel
Hi Mike,

that was indeed my first port of call to debug. I have now reduced the main CSS file to just contain the above CSS and given .box-table a different background colour than .box-table2.

.box-table is correctly floated to the top and spans all columns.
.box-table2 is floated to the bottom and also spans all columns (instead of being confined to its column).
.box-table2 has some of the RHS column text overlaying with its background colour.

My current workaround is
.box-table2 {
	float: left;
	width: 100%;
}

but this does not align it to the bottom.
ThePrintingSquirrel
Doh! I found the problem after going back to the docs.

Rather than the intuitive
column-span: none;

I need to use
column-span: 1;

and it works!

Maybe you can implement an alias so we can use both?
dauwhe
The spec (https://www.w3.org/TR/css-multicol-1/#column-span) has initial value as "none"
mikeday
Prince does not support the "none" value but does support integer values, however there are still unanswered questions about whether "none" is the same as "1":

https://drafts.csswg.org/css-multicol-2/#column-span

For now we should probably treat them identically for convenience.
ThePrintingSquirrel
Hi Mike,
I agree. Specs develop all the time, as does Prince XML, and I'd love that convenience.
Thank you.
mikeday
We have added support for "column-span: none" in Prince 13.2, available now, thanks for letting us know about the issue! :D
ThePrintingSquirrel
Great, thank you for turning this around so quickly!