Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Float table left or right === Two table classes <code>floatleft</code> and <code>floatright</code> (case sensitive) help floating the table and adjusting table margins so that they do not stick to the text. <code>floatleft</code> floats the table to the left and adjusts right margin. <code>floatright</code> does the opposite. Example: <div class="box"> '''Wikitext''' <syntaxhighlight lang=wikitext highlight=3,13> This paragraph is before the table. [[File:Starred.svg |120px|right]] {| class="wikitable floatleft" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {| class="wikitable floatright" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} ... Lorem text after table </syntaxhighlight> </div> '''As it appears in a browser:''' This paragraph is before the table. [[File:Starred.svg |120px|right]] {| class="wikitable floatleft" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {| class="wikitable floatright" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {{lorem ipsum span|9}} Alternatively, you can use '''CSS to get the same result:'''<br> '''<nowiki>{| class="wikitable" style="float:left; clear:left; margin-right:8px;"</nowiki>'''<br> '''<nowiki>{| class="wikitable" style="float:right; clear:right; margin-left:8px;"</nowiki>''' This paragraph is before the table. [[File:Starred.svg |120px|right]] {| class="wikitable" style="float:left; clear:left; margin-right:8px;" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {| class="wikitable" style="float:right; clear:right; margin-left:8px;" |+ Caption text |- ! Header A !! Header B !! Header C |- | row 1 A || row 1 B || row 1 C |- | row 2 A || row 2 B || row 2 C |} {{lorem ipsum span|9}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)