HTML CSS examples for CSS Layout:Text
Align text center in a right floated div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div<!--from www . j a v a 2 s. c o m--> { float:right; width:201px; height:201px; border:solid 2px; } </style> </head> <body> <div style="float:right"> <span style="display:block;text-align:center">some text...</span> </div> </body> </html>