[MyCode] Table with alternated rows
This is not a simple MyCode because there's a small addition in the global.css file, I'll do a plugin later if it's useful.

The goal: creating tables in MyBB posts with alternate lines design (odd and even).

It requires 4 MyCode and 3 css addition.

--- MyCode ---


Regular Expression :
Replacement :
<table class="tborder tfixed clear" cellspacing="0" cellpadding="5"  style="border:0; radius:0;">$1</table>

Table row

Regular Expression :
Replacement :
<tr class="trowaltern">$1</tr>

Table head

Regular Expression :
Replacement :
<th class="thead" valign="middle" style="text-align:center; border-radius:0;"><strong>$1</strong></th>

Table data

Regular Expression :
Replacement :
<td valign="top">$1</td>

--- CSS ---
/* global values for table data */
.trowaltern > td {
	border: 1px solid;
	border-color: #fff #ddd #ddd #fff;
/* even row background */
.trowaltern:nth-child(even) { background: #f5f5f5; }
/* odd row background */
.trowaltern:nth-child(odd) { background: #efefef; }
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Tnx for sharing Smile
MyBB Translator & helper
Please do not PM me requesting free support or help for your forums.
You can see my paid services here.
Thank you for MyCode Table

I did the steps but does not show the table

that its my table example:

result: Huh
[Image: Table-My-Code-Example.png]

any feedback or support to add table.

thanks in advance.
Are you using mycode tags or html tags?
The correct usage is this:
My Projects - Support My Projects

Don't forget to rate posts!
ohh Sorry.. i am lost that in post  Blush

Yes, Work Perfect!

Thanks in advance chack1172 for Support.  today i am customize the forum and forgot some tiypes mycode.

+1 Thank You for Support Blush


Forum Jump:

Users browsing this thread: 1 Guest(s)