Jump to content

Aligning a <div> in the top-left corner


pdedecker

Recommended Posts

How can I align a <div> in the top-left corner of the browser screen? I'm using FF 1.5.x.

<html><head><title>gsqjhfjdhdqfjh</title></head><body><div id="header" width="100%" style="left: -20px; top: 0px; color: white; background-color:#003366;">gjdlkmjkh</div></body></html>

Link to comment
Share on other sites

How can I align a <div> in the top-left corner of the browser screen?
Add the part in red to you <head> section<html><head><title>gsqjhfjdhdqfjh</title><style>body{padding:0;margin:0}</style></head><body><div id="header" width="100%" style="left: -20px; top: 0px; color: white; background-color:#003366;">gjdlkmjkh</div></body></html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...