css - Positioned "fixed" div is centered. Positioned "relative" div is centered. They both appear a little off -


here's looks like:

http://i.imgur.com/h0oqz4q.png

here's css:

#header{ background:url('header.png'); border-radius:15px; box-shadow: 0px 0px 10px 9px rgba(4, 4, 4, 0.75); -moz-box-shadow: 0px 0px 10px 9px rgba(4, 4, 4, 0.75); -webkit-box-shadow: 0px 0px 10px 9px rgba(4, 4, 4, 0.75); height:145px; width:855px; margin:0 auto; z-index:1; position:fixed; left:0; right:0; top:-10px; max-height:145px; max-width:855px; }  #centered_background{ background-color:#f2f2f2; width:845px; height:1000px; margin: 0 auto; position:relative; top:-15px; border-radius:20px; border:4px solid #2e2e2e; left:0; right:0; } 

i'm guessing has "fixed" aspect of header. don't know.

thanks!

the width of wrapper needs defined margin:auto work.

html, body { width:100%; } 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -