centering-1.xhtml (1081B)
1 <?xml version="1.0"?> 2 <window title="Text input text centering test" 3 xmlns:html="http://www.w3.org/1999/xhtml" 4 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 5 <!-- 6 7 There is no spec that says where text within an html text input element 8 should be placed, but some sort of centering reduces the likelihood or 9 extent of clipping. 10 11 This test uses a font where every character used has an ascent and 12 descent equal to typographical ascent of the font. This makes it 13 unlikely that using a different concept of centering will change the 14 results of this test. 15 16 --> 17 <html:style type="text/css"> 18 @font-face { 19 font-family: "Ahem"; 20 src: url(../fonts/Ahem.ttf); 21 } 22 hbox { 23 height: 128px; 24 background-color: white; 25 } 26 input { 27 background-color: white; 28 border: none; 29 margin: 0px; 30 padding: 0px; 31 font-family: "Ahem", sans-serif; 32 font-size: 32px; 33 } 34 </html:style> 35 36 <hbox align="stretch"> 37 <html:input value="Ahem"/> 38 </hbox> 39 </window>