I have made a page template and made some content pages based on the template. Page looks great in Firefox and Google Crome, but in IE9 it is all wrong.
I have made a 800px wide div that holds content centered in webbrowser. In IE9 div and content is left alligned. I cant understand why.
I have actually copied my template and CSS from a Visual Studio project where all is ok. So I wonder if there is any issues with Umbraco and IE9 in this case? Please advice.
Page misalligned in IE9 only
Hi -
Im newbie to Umbraco so I need some advice.
I have made a page template and made some content pages based on the template.
Page looks great in Firefox and Google Crome, but in IE9 it is all wrong.
I have made a 800px wide div that holds content centered in webbrowser.
In IE9 div and content is left alligned. I cant understand why.
I have actually copied my template and CSS from a Visual Studio project where all is ok. So I wonder if there is any issues with Umbraco and IE9 in this case? Please advice.
Kind r
Bjørn.
i think this doesn't related to umbraco
Although this is not related to Umbraco, could you still post the html and css for the element that is misaligned?
Maybe we can help you :)
Hi again -
Seems this ma be a CSS issue then,
here is my sample;
CSS:
#test {
background-repeat: no-repeat;
width: 800px;
margin-top: 0px;
height: 80px;
margin-bottom: 2px;
margin-right: auto;
margin-left: auto;
Template:
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<link rel="stylesheet" href="/css/prove.css"/>
<div id="test"><umbraco:Item field="content" runat="server"></umbraco:Item></div>
</asp:Content>
This gives a 800px wide centered div on all pages in Firefox, Crome etc, but not in IE9 (have not tested IE8)
Im lost here. Any idea why this not gives a centered div in IE?
Have you set the Doctype? For example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Not declaring the Doctype has caused this for me in IE in the past.
Check that it's not showing in Compatibility mode either. If it is turn off compatibility mode.
To programatically force IE to disable compatibility mode (So users can't click it - They shouldn't need to use it) then you can use this:
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
Hi Bjørn Tore
Is this online somewhere? It would make it much easier to test..:-)
Without the doctype IE usually goes into quirks mode but I'm not sure this is true for IE9 any more.
Have you tried running the html through a validator?
/Jan
is working on a reply...