Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjørn-Tore 4 posts 24 karma points
    Apr 12, 2011 @ 09:45
    Bjørn-Tore
    0

    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.

  • Eran Meir 401 posts 543 karma points
    Apr 12, 2011 @ 09:50
    Eran Meir
    0

    i think this doesn't related to umbraco

  • Ove Andersen 435 posts 1541 karma points c-trib
    Apr 12, 2011 @ 10:03
    Ove Andersen
    0

    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 :)

  • Bjørn-Tore 4 posts 24 karma points
    Apr 12, 2011 @ 13:09
    Bjørn-Tore
    0

    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?

     

  • Daniel Harris 33 posts 94 karma points
    Apr 19, 2011 @ 16:16
    Daniel Harris
    0

    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" >

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 19, 2011 @ 22:31
    Jan Skovgaard
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft