Changes

Jump to navigation Jump to search
m
→‎Vertical alignment: Minor correction of code example
*Let's make a container or box with a div tag that is 50px in height with a line of text.
*Next we need to combine the text-align with line-height.
*If we set the height of the line-height to 50 pixels, the text will be in the middle of the container. Here is the coding:<div style="border:2px solid crimson; background-color:moccasin; padding:10px; width:100%; font-size:10pt; font-family:Courier New"><nowiki><div style="</nowiki><font color="blue">line-height:</font color><font color="red">50px</font color>; <font color="blue">text-align:</font color><font color="red">rightcenter</font color>">This text is in the middle<nowiki></div></nowiki></div><br>
<div style="width:100%; height:50px; text-align:center; line-height:50px; border:1px solid red">This text is in the middle.</div>
Moderator, editor, pagecreator, Administrators
13,424

edits

Navigation menu