<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> #header { background: #FFB917; height: 178px; line-height: 100px; border-top-width: thin; border-top-style: solid; border-top-color: #000; } #header2 { float:right; height: 50px; width: 200px; margin-top: 55px; margin-right: 50px; background-color: #CCC; border: thin solid #000; } #header2 p { text-align: center ; } </style> </head> <body> <div id="header"> <div id="header2"> <p>text in box</p> </div> </div> </body> </html>
I see a gray box with "text in box" inside it aligned to the right of the page. What are you trying to do?
For me the "text in box" displays below the gray box in both IE and FF. I would like the text in the middle of the gray box.