WordPress.org

Ready to get started?Download WordPress

Forums

internet explorer issue (3 posts)

  1. chasmackinnon
    Member
    Posted 4 years ago #

    Hi there im having a lot of trouble with a very minor piece of code..
    my blog looks fine in chrome, safari and firefox. However it's aligned to the left in internet explorer, instead of the middle..
    http://www.bettywantsin.com/blog/

    the post CSS seems to be the issue, but i have played round for hours with no luck..
    here is the CSS i am currently using

    .post {
    	margin: 4.6em 0;
    	padding: 2.7em;
    	position: relative;
    	margin-left: auto;
    	margin-right: auto;
    	clear: both;
    	display: block;
    	height: 375px;
    	line-height: 19px;
    	width: 600px;
    }

    if anyone can help i would be so highly grateful, this issue is the last hurdle before i can launch the site..

    thanks in advanced..

    Chas

  2. Izvarinskij
    Member
    Posted 4 years ago #

    Because you have error with doctype (Doctype always should go first, but you have <title> tag before it. That way IE trigger quirks mode (which does not undestand margin:auto).

    You need to fix it in header.php.

  3. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    validation errors:
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bettywantsin.com%2Fblog%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
    often have negative effects in some browsers

    there is a title tag before the DOCTYPE declaration in header.php:

    <title>Betty Wants In - Blog</title><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head profile="http://gmpg.org/xfn/11">
    	<title> - </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    edit header.php and move this title tag further down, to where the empty one is.
    there is no guarantee that this is all that is needed to be changed,
    but valid code is essential for cross-browser compatibility.

Topic Closed

This topic has been closed to new replies.

About this Topic