BaselinePosition
✖
BaselinePosition
is an option that specifies where the baseline of an object is considered to be for purposes of alignment with surrounding text or other expressions.
Details


- BaselinePosition is an option for such objects as Graphics, Grid, and TabView.
- BaselinePosition->pos specifies that position pos in an object should align with the baseline of surrounding text or other expressions.
- Possible settings for BaselinePosition are:
-
Automatic default object baseline Bottom bottom of object Top top of object Center halfway between top and bottom Axis axis of the object Baseline baseline of the first text line Scaled[y] fraction y of the height of the object i baseline of row i in a grid {i,j} baseline of element i,j in a grid {{i,j},pos} position pos in element i,j pos->ref baseline offset to make pos be aligned with ref - For objects that contain multiple lines of text, BaselinePosition->Baseline specifies that the baseline of the whole object should be taken to be the baseline of the first line of text.
- Scaled[0] corresponds to the bottom of the object; Scaled[1] to the top. If y is outside the range 0 to 1, Scaled[y] gives a baseline that lies outside the object.
- In BaselinePosition->(pos->ref ) the reference point ref can be Baseline, Axis, Bottom, Top, or Center. It can also be Scaled[y], where y represents a fraction of the total height of a single line of text in the current font.
- The reference point ref is relative to the line height of the default font surrounding the object. Top aligns with the top of the font's ascender, while Bottom aligns with the bottom of the font's descender.
- For objects that are typically a single line tall, such as Button and PopupMenu, BaselinePosition->Automatic generally corresponds to BaselinePosition->Baseline.
- For objects that typically span multiple lines such as Grid and Panel, BaselinePosition->Automatic generally corresponds to BaselinePosition->(Axis->Baseline).
- For text, the position of the axis is determined by the placement of - or a similar character. For other objects, the axis is taken to be the center, except when a construct such as a fraction bar or graphics axis defines another natural choice.
- Some settings of BaselinePosition are incompatible with the Full and Scaled settings of the vertical dimension of ImageSize. When these settings conflict, the BaselinePosition setting will supercede the ImageSize setting.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Align the bottom of a grid with the baseline of the surrounding text:

https://wolfram.com/xid/05f1e6skya-hyc1vk

Align the center of a graphic with the baseline of the text:

https://wolfram.com/xid/05f1e6skya-buc9ty

Specify the baseline of each cell within a grid:

https://wolfram.com/xid/05f1e6skya-lgvp3

Scope (6)Survey of the scope of standard use cases
Align the center of objects with the baseline of the surrounding text:

https://wolfram.com/xid/05f1e6skya-rm0o2


https://wolfram.com/xid/05f1e6skya-jpvtzg


https://wolfram.com/xid/05f1e6skya-fag7pb

Align the top of the grid with the baseline:

https://wolfram.com/xid/05f1e6skya-ouy59i


https://wolfram.com/xid/05f1e6skya-ns6bm1

Align the bottom of the grid with the baseline:

https://wolfram.com/xid/05f1e6skya-bf2yxg


https://wolfram.com/xid/05f1e6skya-d6wh72

Specify the baseline of panel as a fraction of the height by using Scaled:

https://wolfram.com/xid/05f1e6skya-drddxi

Use the axis of a graphic as the baseline:

https://wolfram.com/xid/05f1e6skya-dqmnv1


https://wolfram.com/xid/05f1e6skya-j5kexy

Specify the baseline within Row:

https://wolfram.com/xid/05f1e6skya-lyzq0l

Specify the baseline within Grid:

https://wolfram.com/xid/05f1e6skya-18pi4

Generalizations & Extensions (3)Generalized and extended use cases
Align a specific grid element with the baseline:

https://wolfram.com/xid/05f1e6skya-blo239


https://wolfram.com/xid/05f1e6skya-cvwtao


https://wolfram.com/xid/05f1e6skya-mu61zq

Align the bottom of the grid with the bottom of surrounding text:

https://wolfram.com/xid/05f1e6skya-f51cpz

Align the center of the grid with the axis of text:

https://wolfram.com/xid/05f1e6skya-hq6k3a

Align the axis of the graphic with the top of the text:

https://wolfram.com/xid/05f1e6skya-hjt6dk

Wolfram Research (2007), BaselinePosition, Wolfram Language function, https://reference.wolfram.com/language/ref/BaselinePosition.html (updated 2012).
Text
Wolfram Research (2007), BaselinePosition, Wolfram Language function, https://reference.wolfram.com/language/ref/BaselinePosition.html (updated 2012).
Wolfram Research (2007), BaselinePosition, Wolfram Language function, https://reference.wolfram.com/language/ref/BaselinePosition.html (updated 2012).
CMS
Wolfram Language. 2007. "BaselinePosition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/BaselinePosition.html.
Wolfram Language. 2007. "BaselinePosition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/BaselinePosition.html.
APA
Wolfram Language. (2007). BaselinePosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BaselinePosition.html
Wolfram Language. (2007). BaselinePosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BaselinePosition.html
BibTeX
@misc{reference.wolfram_2025_baselineposition, author="Wolfram Research", title="{BaselinePosition}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/BaselinePosition.html}", note=[Accessed: 22-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_baselineposition, organization={Wolfram Research}, title={BaselinePosition}, year={2012}, url={https://reference.wolfram.com/language/ref/BaselinePosition.html}, note=[Accessed: 22-April-2025
]}