March 30, 201313 yr Hello! Iam new to this forum and I know the basics of css & html, & using Dreamweaver CS6 my problem is this #header { background-color:#0080FF; height: 100px; width: 90%; z-index: 1; position: fixed; text-align: center; border: 2px solid black; margin: auto; } In dreamweaver view (Not Live) the Div tag is Centered in Split Screen when I click Live it leans to the far left & isn't centered + when I check in IE9 & Google Chrome it leans to the left? what am I doing wrong?
March 30, 201313 yr You can't use margin auto on fixed and absolutely positioned elements. Either remove position fixed or use left: 50% and then negative margin-left of half the width: http://jsfiddle.net/kSuHT/ ~evu.
March 30, 201313 yr Author Never ever, ever, ever, EVER use Dreamweaver to preview CSS. Dreamweaver is only useful as code editor. I found that out when it didn't match the browser
Create an account or sign in to comment