Text middle insde div


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <div style="height:200px; width:200px; line-height:200px; background:#000; color:#fff">
  10.  
  11. <p>Teste</p>
  12. </div>
  13. </body>
  14. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.