The text-underline-position property sets the position of an underline specified on the element. (It does not affect underlines specified by ancestor elements.) If 'left' or 'right' is specified alone, 'under' is also implied.

  • Initial valueauto
  • Applies toAll elements
  • InheritedYes
  • MediaVisual
  • Computed valueAs specified
  • AnimatableNo
  • CSS VersionCSS3
  • JavaScript
Formal syntax: auto | [ under || [ left | right ] ] 

text-underline-position: auto;
text-underline-position: under;
text-underline-position: under left;
text-underline-position: under right;
  • autoThe browser may use any algorithm to determine the underline's position; however it must be placed at or under the alphabetic baseline.
  • underThe underline is positioned under the element's text content. In this case the underline usually does not cross the descenders. (This is sometimes called "accounting" underline.) This value can be combined with 'left' or 'right' if a particular side is preferred in vertical writing modes.
.class {
   text-underline-position: under left;

Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.