CSS getting distorted while using the custom WebUserControl in an ASPx page
I have a very simple Web UserControl derived from System.Web.UI.UserControl. At Design Time the user control looks perfect in the VS2008 Pane with all CSS styles. When I drag n drop this control on an as开发者_如何转开发px page, the CSS style gets applied but some texts get hidden and the CSS looks distorted.
I have checked the path of the CSS, UserControl and the ASPx page. All are in the same level under root. The aspx page just contains the UserControl in a FORM tag.
Any idea what is going wrong ?
Found the solution !!!!
VS2008 adds this DOCTYPE by default -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Change it to
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
This solves the issue. Stylesheet gets applied properly !!!
精彩评论