2

When highlighting text using Style and Background, as in Style["Test ", White, Background -> Lighter@Blue] is there a way to pad (ie, enlarge) the bounding box?

The bottom of the background seems coincident with the base of the text: here

alancalvitti
  • 15,143
  • 3
  • 27
  • 92

2 Answers2

3
Style[Pane[" Test "], White, Background -> Lighter@Blue]

enter image description here

Edit

Controlling the padding:

Style[Pane[" Test ", ImageMargins -> 10], White,  Background -> Lighter@Blue]
Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453
3

You could play with the FrameMargins ...

Framed[Style["Test", White], FrameStyle -> None, FrameMargins -> 2, 
 Background -> Lighter@Blue] 

test

cormullion
  • 24,243
  • 4
  • 64
  • 133