View Single Post
Old 01-23-2013, 04:24 PM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello jeddi,
Do not use deprecated <center> tags!

To center an element you need three things:
  1. a valid DocType
  2. an element with a width
  3. that elements right/left margins set to auto

Since your #banner gets it's 900px width from inline styling, adding this bit in red to your CSS will center it.
Code:
#banner {
    border: 3px solid black;
    display: none;
    /*top: 0;
    left: 0; */
    margin: auto;
    overflow: hidden;
    position: relative;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote