So I came into this recent issue where my div was not centered in IE. I was like I do not understand. I had the code as follows
<div style="margin:auto;width:600px;">Hello</div>
For some reason my div was not aligning in the middle. Well then I realized I was missing the DOCTYPE code in the header. Because in dreamweaver I just erased all code when I started to work.
Throw this guy up at the top!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Then you should be fine!
No comments:
Post a Comment