0

My webpage wont work with IE. I fully validated my webpage with W3C, and I made sure not to use anything that was not supported in all browsers (at least I think I did) I think I tested it with IE 8 (I don't have IE installed, just used a free webprogram)

Basicly with IE the sidebar took up the full space of the page, and then the rest of the website went below the sidebar. By the way I cannot change things to absolute. (I absolutly can't change it to absolute haha) http://www.adrianhoulewebprojects.com/

<!--Home Page for adrianhoulewebpojects.com Version 1.0-->
<!--Written by Adrian Houle-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
    <link rel="stylesheet" type="text/css" href="css/HomePageStyle.css">
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
    <title>Adrian Houle Web Projects</title>
</head>

<body>

    <div id="Sidebar">
        <h3>Projects</h3>
        <ul>
            <li>
                <a href="http://www.adrianhoulewebprojects.com/UnderConstruction.html">Under Construction</a>
            </li>
            <li>Unfinished Project #2</li>
            <li>Unfinished Project #3</li>
            <li>Unfinished Project #4</li>
            <li>Unfinished Project #5</li>
        </ul>
    </div>

    <div class="box">

        <div class="HalfSpacer"></div>

        <div class="TransBox" id="Header">
            <h1>Welcome to<br>AdrianHouleWebProjects.com</h1>
        </div>

        <div class="Spacer"></div>

        <div class="TransBox" id=About>
            <h2>About:</h2>
            <p>Welcome to my website. I had a bit of time over the holidays and decided to finally get around to learning web programming. The purpose of this website is to give me a place to practice and display what I learn in the form of web projects. I may also be making some blogs that will also serve to showcase my travelling and hobbies. Note: If you are accesing this on a mobile phone you will probaly notice the side bars text is sticking out of its box; this is just part of the joys of web porgraming, I cannot fix it for this page without rewriting it, but my next web page will be compatible.</p>
        </div>

        <div class="Spacer"></div>

        <div class="TransBox" id="NewStuff">
            <h2>Coming Soon</h2>
            <ul>
                <li>
                    <h3>Australia Travel Blog</h3>
                    <img src="http://www.adrianhoulewebprojects.com/img/AustralianFlag100by50.gif"  alt="Australian Flag" >
                    <p>2013-2014 Australia Travel Blog coming soon.</p>
                </li>
            </ul>
        </div>

        <div class="Spacer"></div>

        <div class="TransBox" id="Contact">
            <h2>Contact Info:</h2>
            <p class="Italic">Please report any compatibility, accessibility, or security issues to:</p>
            <p>Adrian Houle</p>
            <p>adrianhoule@gmail.com</p>
        </div>

        <div class="Spacer"></div>

        <div class="TransBox" id="Footer">
            <p>Website by Adrian Houle</p>
        </div>

    </div>
    <div class="BottomBorder"></div>

</body>

</html>

CSS code

/*****************************************  Info  *********************************************************/
/*Style Sheet for HomePage of adrianhoulewebprojects.com*/
/*Written by Adrian Houle*/
/*For any issues with my website (compatibility, accessibility, white-hat reports) feel free to contact me at
 adrianhoule@gmail.com
/*Page Purpose: Create a homepage that welcomes users to my website and directs them to various projects*/
/***********************************************************************************************************/

/*************************************  Table of Contents  **************************************************/
/*CSS layout*/
/*  -none specific elements*/
/*  -classes*/
/*  -ID's and children of ID's*/
/*  -Other*/
/************************************************************************************************************/

/**************************************      CSS code     ****************************************************/

/* -none specific elements ***********************************************************************************/

p {
    font-size: large;
    font-weight: bolder;
}

a {
    color: blue;
}

a:hover, a:focus{
    background-color: yellow; 
    text-decoration: none;
    font-size: larger;
}

/* -classes **************************************************************************************************/

/*Element that contains everything except the sidebar and has the main background image.*/
.box { 
    display: block;
    position: relative;
    width: 100%; /*test and adjust to keep it from expading the browser*/
    height: 100%;
    border: 3px solid black;
    right: 0;
    top: 0px;
    padding: 0;
    background-image: url(http://www.adrianhoulewebprojects.com/img/CautionStripes.png);
} 

/*Allows for synchronised space adjustment between elements*/
.Spacer {
    position :relative;
    height: 100px;
}
/*Allows for synchronised space adjustment between elements*/
.HalfSpacer {
    position :relative;
    height: 30px;
}

/*Every element that contains text belongs to this class*/
/*This class has nothing to do with transgender boxes, or gender boxes in general*/
.TransBox {
    width: 70%;
    padding: 1em;
    z-index: 1;
    left: 20%;
    position: relative;
    background-image: url(http://www.adrianhoulewebprojects.com/img/SteelPlate.jpg);
    moz-box-shadow: 0 0 5px 5px #888; /*shadow effect with cross compatibility*/
    webkit-box-shadow: 0 0 5px 5px#888;
    box-shadow: 0 0 5px 5px #888;
}

.Italic {
    font-style: Italic;
}
/* -ID's and children of ID's********************************************************************************/

/*Sidebar, to be fixed to the left hand side of the screen. Must allow conent to the right of it*/
#Sidebar {
    height: 100%;
    width: 10%;
    left: 0px;
    top: 0px;
    padding: 2%;
    display: inline;
    position: fixed;
    background-image: url(http://www.adrianhoulewebprojects.com/img/SteelPlate.jpg);
    border-style: solid;
    border-width: 3px;
    z-index: 2;
}
#Sidebar ul {
    padding-left:0;
}
#Sidebar li {
    margin: 10%;
}

/*Header text*/
#Header h1 {
    text-align: center;
}

#Footer p {
    text-align: center;
}
/* -Other (empty)*****************************************************************************************/

Thanks for any help.

Adrian
  • 45
  • 1
  • 6
  • I am impressed with the organization of your CSS. Unless you want spam, you may want to remove your email from the code. Creating a contact form may be a better way to receive messages. – block14 Dec 31 '13 at 10:50
  • Perhaps one of the answers on "http://stackoverflow.com/questions/1193255/position-fixed-and-internet-explorer " will help. – towr Dec 31 '13 at 10:56
  • Try adding `float:left` on `Sidebar` – Surjith S M Dec 31 '13 at 10:58

1 Answers1

0

You should force IE8 to render with edge:

<meta http-equiv="X-UA-Compatible" content="IE=edge">

It can be placed within the head of your HTML:

<!DOCTYPE html> 
<html> 
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- other head tags -->
  </head>
  <body>
  </body>
</html>

Check out this answer for more a more indepth look at how it can be used.

Community
  • 1
  • 1
block14
  • 607
  • 1
  • 6
  • 24
  • This will almost certainly only help with versions of Internet Explorer 9 and above... – pwdst Dec 31 '13 at 10:50
  • @pwdst X-UA-Compatible header is supported with IE8 and later. – block14 Dec 31 '13 at 10:53
  • Yes, but the effect is to force Internet Explorer not to render using a compatibility mode - not to add support for any missing standards (JavaScript, HTML5 or CSS3) or change nonstandard APIs or box model. – pwdst Dec 31 '13 at 10:58
  • I just downloaded IE, and got the latest version and it works on that. So would this code help then? How to I apply it? – Adrian Jan 01 '14 at 05:11
  • @user3148769 This meta tag should be placed within the head of your HTML (I updated the answer to show this) or added to the headers of your webserver (useful for production sites). Yes, I tested with IE8 on Windows XP and it forced the browser out of quirks mode and into IE8 compatibility. – block14 Jan 01 '14 at 05:54