Jump to content

Module:Aligned table: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 10: Line 10:
local class = args['class'] or ''
local class = args['class'] or ''
local style = args['style'] or ''
local style = args['style'] or ''
local leftright = args['leftright'] or ''
local fullwidth = args['fullwidth'] or ''
if leftright ~= '' then
colstyle[1] = 'text-align:left;'
colstyle[2] = 'text-align:right;'
    end
if fullwidth ~= '' then
style = 'width:100%; border-collapse: collapse; border-spacing: 0px; border:none;' .. style
end
if class ~= '' then
if class ~= '' then
class = ' class="' .. class .. '"'
class = ' class="' .. class .. '"'
Line 19: Line 28:
for i = 1,cols do
for i = 1,cols do
colstyle[ i ] = colstyle[ i ] or ''
if args['align' .. tostring(i)] then
if args['align' .. tostring(i)] then
colstyle[ i ] = 'text-align:' .. args['align' .. tostring(i)] .. ';'
colstyle[ i ] = 'text-align:' .. args['align' .. tostring(i)] .. ';' .. colstyle[ i ]
else
colstyle[ i ] = ''
end
end
if args['style' .. tostring(i)] then
if args['style' .. tostring(i)] then
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.