I am having a problem with space around a div. The page looks perfect in the VS internal browser, but there is space at the top between the body and the div for the page layout in IE and FireFox. I tried everything I know by setting margins to 0 and padding to 0 for the body, div, form, almost everything and there is still space. The wierd thing is that the space shows the background color when I set the padding for the div#page to 0, and the space is the div#page background color when the padding is set to a value.
I must be missing something. I looked at the page's HTML after it is rendered from the server and it inserts a dive with a hidden control for the viewstate. I thought this might be causing the problem so I set the margin and padding for all divs to 0, but it did nothing.
The code for the simple page and CSS is provided below.
It appears the problem disappears and the page looks as I intended when I use the Compatibility View in IE8.
Thanks for the help in advance,
ASPX HTML Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CSSDemo1.aspx.vb" Inherits="Web.CSSDemo1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/
View Complete Post