Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Parameters  





3 Examples  





4 See also  














Template:Pad






Аԥсшәа
العربية

Asturianu
Azərbaycanca
تۆرکجه

Banjar
Basa Banyumasan
Беларуская

Bikol Central
Bosanski
Cymraeg
Dansk
Deutsch
Dolnoserbski
Eesti
Ελληνικά
Español
Esperanto
فارسی
Føroyskt
Français
Galego


Հայերեն
ि
Hornjoserbsce
Ilokano
Bahasa Indonesia
Jawa

Қазақша
Kurdî
Кыргызча
Latina
Latviešu
Magyar
ि
Македонски

 / Mìng-dĕ̤ng-nḡ
Монгол


 

Norsk bokmål
ି
Oʻzbekcha / ўзбекча


Polski
Português
Română
Русский
Scots
Sesotho sa Leboa
Simple English
سنڌي
Slovenčina
Slovenščina
کوردی
Српски / srpski
Suomi
Svenska
Taqbaylit
 



Türkçe
Українська
اردو
Tiếng Vit

ייִדיש

Zazaki

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, emorex (other CSS units – in, cm, pc, pt – are supported as well, but not recommended, typically at 96dpi conversion ratio). The default is 1.0em.

The result is the specified padding followed by an &nbsp; (non-breaking space – at 100% font size (8pt), typically 3px wide in narrow fonts like Arial and Tahoma, 4px in wider fonts like Arial Black and Verdana).

Parameters

|1=
size of padding
|css=
optional additional CSS code

Examples

Indenting by 50 pixels plus an &nbsp; (53px in Arial):

Produces:

Width of a typical year-range in Arial font (4.8em plus an &nbsp;):

Produces:

This is better produced by:

Which produces:


However, some digits supposedly require less space:

Produces:

But actually not:

Produces:


Spacing is, of course, different between fonts, too:

Note: 1em is typically 11.2px at 100% font size (8 point), 21.3px at 200% font size (16 point), and 32px at 300% font size (24pt).

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Pad&oldid=1147672188"

Category: 
Inline spacing templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 1 April 2023, at 12:47 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki