Module:NavboxMobile: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary |
EnWikiAdmin (talk | contribs) No edit summary |
||
Line 227: | Line 227: | ||
:cssText(args.basestyle) | :cssText(args.basestyle) | ||
:cssText(args.titlestyle) | :cssText(args.titlestyle) | ||
:css('position', 'relative') -- Ensure relative positioning for absolute children | |||
-- Add the | -- Add the title content, centered | ||
titleCell | titleCell | ||
:tag('div') | :tag('div') | ||
:css('margin', '0') | |||
:css('text-align', 'center') | |||
:wikitext(addNewline(args.title)) | |||
-- Add the navbar, positioned absolutely to not affect the title's centering | |||
if has_navbar() then | |||
titleCell | |||
- | :tag('div') | ||
:addClass('navboxMobile-navbar') | |||
:css('position', 'absolute') | |||
:css('top', '0') | |||
:css('right', '0') | |||
:wikitext(navbar{ | |||
args.name, | |||
mini = 1, | |||
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;' | |||
}) | |||
end | |||
end | end | ||
Line 464: | Line 447: | ||
-- Add the below row | -- Add the below row | ||
renderBelowRow(tbl) | renderBelowRow(tbl) | ||
return tbl | return tbl |