?
Solved

Why does this page look great in Safari and not so hot in IE

Posted on 2012-08-21
8
Medium Priority
?
278 Views
Last Modified: 2012-09-10
Attached are two screen shots of the same webpage, loosecannonfitness.com

The one that has the grey background is from Safari, the other is in IE8. I have my stylesheet below. What do I need to change so IE renders the page the same way Safari does?

Here's my stylesheet:


html {
      background: url(images/background.jpg) no-repeat center center fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
}

body {
margin: 0px 0px 0px 0px;

}

td {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #000000;
      vertical-align:top;
      text-align:left;
      font-weight:normal;
}

td.repeating_background {
background:url(images/repeating_background_1.jpg);
background-repeat:repeat-x;
height:140px;
z-index:-1;
}

td.title_body {
width:850px;
}

td.top_header {
text-align:center;
}

td.facebook {
font-size:12px;
color:#000000;
vertical-align:top;
}


td.footer {
font-family: Verdana, Microsoft Sans Serif;
font-size: 9px;
color: #ffffff;
text-align:left;
}

td.align_right {
text-align:right;
}

#outerbox {
position:relative;
width: 1200px;
margin: 50px auto;
}

#container {
padding: 20px;
z-index: 1000;
color:#000000;
}
#page_wrap {
  position: absolute;
  top :0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color:#ffffff;
opacity:0.3;
filter:alpha(opacity=30);
  vertical-align:top;
  text-align:left;
  z-index: -1;
}


#body_text {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      vertical-align:top;
      text-align:left;
      }


li{margin-left:10px;}

TEXTAREA {
      width:100px;
      height:250px;
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      float:left:
      }
      
      TEXTAREA.homepage {
      width:563px;
      height:250px;
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      float:left:
      }
      
TEXTAREA.consultation {
      width:349px;
      height:100px;
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      float:left:
      }
      
      TEXTAREA.notes {
      width:600px;
      height:100px;
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      float:left:
      }
      
      TEXTAREA.admin {
      width:450px;
      height:200px;
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      float:left:
      }
      
select {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      }
      
      select.form_select {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
      }

      input {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 11px;
      color: #000000;
}

input.kit {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #000000;
}

li {
margin-left: 15px;
}


#imagefadebox {
  display: none;
  position: absolute;  
  list-style-type: none;
  list-style-position: outside;
  list-style-image: none;
  margin-top: 10px;
  margin-right: 0px;
  margin-bottom: 0px;
  margin-left: -30px;
}

#portfolio { margin-top: 0px; }

<UL style="height: 0px; position: relative; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;">

A
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #000000;
      text-decoration:underline;
}

A:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #000000;
      text-decoration:underline;
}

A:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #000000;
      text-decoration:underline;
}

A.links
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #ffffff;
      font-weight:bold;
      text-decoration:none;
}

A.links:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #ffffff;
      font-weight:bold;
      text-decoration:none;
}

A.links:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 14px;
      color: #ffffff;
      font-weight:bold;
      text-decoration:none;
}

A.facebook
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-decoration:none;
}

A.facebook:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-decoration:none;
}

A.facebook:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-decoration:none;
}

 
 A.footer
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #ffffff;
      text-align:left;
      text-decoration:none;
}

A.footer:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #ffffff;
      text-decoration:none;
}

A.footer:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #ffffff;
      text-align:left;
      text-decoration:none;
}

 A.ground_footer
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #7a7a7a;
      text-align:left;
      text-decoration:none;
}

A.ground_footer:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #7a7a7a;
      text-decoration:none;
}

A.ground_footer:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #7a7a7a;
      text-align:left;
      text-decoration:none;
}

A.show_menu
{
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-align:left;
      text-decoration:none;
}

A.show_menu:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-decoration:none;
}

A.show_menu:Visited {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 12px;
      color: #000000;
      text-align:left;
      text-decoration:none;
}

A.resource_text
{
ont-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #ffffff;
      text-decoration:underline;
}

A.resource_text:Hover {
      font-family: Verdana, Microsoft Sans Serif;
      font-size: 9px;
      color: #ffffff;
      text-decoration:underline;
}

A.resource_text:Visited {
font-family: Verdana, Microsoft Sans Serif;
font-size: 9px;
color: #ffffff;
      text-align:left;
      text-decoration:underline;
}

#logo {
  position: absolute;
  top: 1%;  /* Change this to move to where you want it */
  left: 1%; /* Change this to move to where you want it */
}
#links {
color:#ffffff;
position: absolute;
top: 1%;
right: 2.5%;
z-index:1;
}
Screen-Shot-2012-08-21-at-8.52.2.png
Screen-Shot-2012-08-21-at-8.52.2.png
0
Comment
Question by:brucegust
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:zappafan2k2
ID: 38319003
Without even looking at the CSS, the first thing I would recommend is to add a DOCTYPE to your page and see how it looks.

IE requires it for many CSS conventions.
http://www.w3schools.com/html/html_doctype.asp
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38319140
That is not even a complete page.  In addition to not having a DOCTYPE, a number of things are missing including some </a> tags and the </body></html> tags at the end.  Besides, both of your screen shots are of Safari, neither one is IE.
0
 

Author Comment

by:brucegust
ID: 38319881
The DOCTYPE was the thing that made it work. It's amazing that in the midst of trying to get all your "code" working, you miss some basics and everything goes up in smoke.

BTW: I went with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> only because, according to http://www.w3schools.com/tags/tag_doctype.asp it allowed for frameset content and I have some of that with some youtube elements. I'm not sure if that logic is sound, but I wanted to run that past you to see what you thought.

I'll repair the missing tags and we'll be in business.

Thanks so much!
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:zappafan2k2
ID: 38320633
That DTD is fine.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38321542
No it really isn't, you do not have a FRAMESET on that page.  You should be using one of the XHTML DOCTYPEs for what you have on the second line.
0
 
LVL 12

Expert Comment

by:zappafan2k2
ID: 38322054
My mistake.  DaveBaldwin is correct (as usual).
0
 

Author Comment

by:brucegust
ID: 38335178
Dave, would you be willing to tell me what doctype I should be using, or direct me to a resource that spells it out just so I don't repeat this error in the future?

Thanks!
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 38335240
Here is the page listing the different DOCTYPEs: http://www.w3.org/QA/2002/04/valid-dtd-list.html   A DOCTYPE tells the browser how it is supposed to interpret and display the HTML elements.  The different DOCTYPEs do not support all of the same elements or exactly the same syntax.  While the most common elements will usually display the same, you can have small or big differences by changing DOCTYPEs.

An equally big problem on loosecannonfitness.com is that it is not complete.  The obvious thing is that your closing </body></html> tags are missing at the end.  You also have several <a> tags that do not have closing </a> tags to go with them.

Browsers display web pages by going thru a set of rules (determined by the DOCTYPE) about how to display the elements.  When you don't follow the rules, the browsers will make their best guess as to what you mean.  It doesn't always match what you thought would happen.

The most 'forgiving' DOCTYPE is HTML 4.01 Transitional which is what I use most of the time.  You can look that up on the link above.  If I wanted to use some of the new elements in HTML5, I would have to use the HTML5 DOCTYPE... but I would also need to follow the rules for HTML5 which are not exactly the same as HTML4.01.

I put your page thru the W3C Validator and it found 111 errors.  You need to fix many of them but I wouldn't worry about the 'alt' errors and the '&' errors right now.  A number of the others can cause display problems.  http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Floosecannonfitness.com%2F
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month16 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question