Single post in A Somewhat Extensive Guide to BBCodes
Forum Index > PokéFarm > Guides > A Somewhat Extensive Guide to BBCodes >
Hmm, this isn't perfect, there's a tiny border of the old color, but I couldn't think of another way that didn't involve counting rows/cells with nth-of-type or something, at least without access to the underlying html... perhaps there is a way, but I'm up too late coding lol
Basically you just wrap the contents of the cell you want to highlight in the styleclass [sc=tbl-highlight] [/sc]
Some of the code is kind of hacky... it worked for me on Firefox for Windows, but if the short cell doesn't take up the whole height, that's probably what's wrong, and I'd need to look again.
| example | |||
|---|---|---|---|
This cell is short & wide |
|
|
|
|
|
|
|
Code
[table]
[tr]
[th=4x1]example[/th]
[/tr]
[tr]
[td][sc=tbl-highlight][css="font-size:75%;"] This cell is short & wide [/css][/sc][/td]
[td][sc=tbl-highlight] [pkmn=shinx] [/sc][/td]
[td] [pkmn=luxio] [/td]
[td] [pkmn=luxray] [/td]
[/tr]
[tr]
[td][sc=tbl-highlight] [pkmn=shinx] [/sc][/td]
[td] [pkmn=luxio] [/td]
[td] [pkmn=luxray] [/td]
[td] [pkmn=luxray/mega forme q] [/td]
[/tr]
[/table]
[style]
tr {
/*
this is hacky, but lets the below height setting work
technically you can't set row height this way
so the setting is mostly ignored on most browsers
*/
height: 0;
td {
height: 100%;
}
}
.tbl-highlight {
height: 100%;
background: #ffe375;
color: black;
}
[/style]







