sseeley Posted March 22, 2009 Share Posted March 22, 2009 Can anyone help me with this code. I am just trying to centre the line of text, and set it 50px from the top of the screen? <style> #menuBar { display: block; width: 50%; margin-left: auto; margin-right: auto; } </style> <body> <div id="menuBar">Your content here</div> Thanks Quote Link to comment Share on other sites More sharing options...
Maq Posted March 22, 2009 Share Posted March 22, 2009 Add this: margin-top: 50px; text-align: center; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.