Expression > Forums Home > Expression Studio Forums > Expression Web and SuperPreview > Text color correct in IE7 but not in IE8
Ask a questionAsk a question
 

Proposed AnswerText color correct in IE7 but not in IE8

  • Friday, July 03, 2009 9:33 AMggeoff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi
    I have a temporary page on one of my websites that has a site navigation bar that renders correctly in IE7 the link text is white. In IE8 it's black -the Body colour I have tried using Compatibility mode and that makes no difference. Another difference is that the page color only extends as far as the present content in IE7 but fills the viewport in IE8.

    In Firefox the first link is white and the rest are black. In all three browsers the text shows Underline on Hover even though I have text decoration set to "none" in the stylesheet.

    The page validates as XHTML Strict. The page URL is: www.camberseaside.co.uk/geoff1.html  My code is:
    /* This rule resets a core set of elements so that they will appear consistent across browsers. 
    
    Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox
    
     and Internet Explorer because each browser has a different top margin default value. 
    
     By resetting these values to 0, the elements will initially be rendered in an identical fashion and their
    
      properties can be easily defined by the designer in any subsequent rule. */
    
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
    
      margin: 0;
    
      padding: 0;
    
      border: 0;
    
      outline: 0;
    
      font-size: 100%;
    
    }
    
    /* The body is the outermost layout component and contains the visible page content. Setting properties for the body element
    
     will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set 
    
     global properties, it is common to use the body element to set the background color of the page and create a centered container
    
      for the page content to display. */
    
    body {
    
      background-color: #c0c0c0;
    
      line-height: 14px;
    
      font-size: 11px;
    
      color: #2c2d2e;
    
      font-family: Georgia, "Times New Roman", Times, serif;
    
      text-align: center; /* Centers the page content container in IE 5 browsers. */
    
      margin: 20px 0px 0px 0px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
    
      padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
    
      font-weight: normal;
    
      
    
    }
    
    img {border: 1px;color: #ffffff}
    
    .floatright {
    
    	float: right;	
    
    }
    
    .clearight {
    
    		clear: right;
    
    }
    
    .floatleft {
    
    	float:left;
    
    	clear: left;
    
    }
    
    .clearleft {
    
    	clear:left;
    
    }
    
    
    
    /* Commonly used to style page titles. */
    
    
    
    h1 {
    
      line-height: 28px;
    
      color: #777890;
    
      font-size: 28px;
    
      font-weight: bold;
    
    }
    
    .h1pagetitle{
    
    	
    
    	text-align:center;
    
    	position:relative;
    
    	left:0px;top:30px
    
    	
    
    }
    
    /* Commonly used to style section titles. */
    
    h2 {
    
      line-height: 14px;
    
      color: #777890;
    
      font-size: 12px;
    
      font-weight: bold;
    
    }
    
    /* Sets the style for unvisited links. */
    
    a,  a:link {
    
      color: #5456ef;
    
      font-weight: bold;
    
      text-decoration: none;
    
    }
    
    /* Sets the style for visited links. */
    
    a:visited {
    
      color: #50516b;
    
      font-weight: bold;
    
      text-decoration: none;
    
    }
    
    /* Sets the style for links on mouseover. */
    
    a:hover {
    
      color: #3a32c4;
    
      text-decoration: underline;
    
    }
    
    /* Sets the style for a link that has focus. */
    
    a:focus {
    
      color: #3a32c4;
    
    }
    
    /* Sets the style for a link that is being activated/clicked. */
    
    a:active {
    
      color: #383644;
    
    }
    
    /* This is a container for the page content. It is common to use the container to constrain the width of the page content
    
     and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width
    
      and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center
    
       defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the
    
        container on the page. */
    
    #outerWrapper {
    
      background-color: #fff;
    
      width: 92em;
    
      text-align: left; /* Redefines the text alignment defined by the body element. */
    
      margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
    
    }
    
    #outerWrapper #header {
    
      background-color: #9ea3aa;
    
      line-height: 15px;
    
      font-size: 18px;
    
      padding: 5px 5px 5px 5px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
    
      font-weight: bold;
    
      border-bottom: solid 1px #767a7f; /* Sets the bottom border properties for an element using shorthand notation */
    
      }
    
    
    
    
    
    #outerWrapper #header h1 {
    
    	line-height: 28px;
    
    	color: #fff;
    
    	font-size: xx-large;
    
    	font-weight: bold;
    
    }
    
    #outerWrapper #header h2 {
    
      line-height: 14px;
    
      color: #000;
    
      font-size: 12px;
    
      font-weight: bold;
    
    }
    
    #outerWrapper #header a, #outerWrapper #header a:link {
    
    	color: #FFFFFF;
    
    	font-weight: normal;
    
    	text-decoration: none;
    
    }
    
    #outerWrapper #header a:visited {
    
      color: #000;
    
      font-weight: bold;
    
      text-decoration: none;
    
    }
    
    #outerWrapper #header a:hover {
    
      color: #000;
    
      text-decoration: underline;
    
    }
    
    #outerWrapper #header a:focus {
    
      color: #000;
    
    }
    
    #outerWrapper #header a:active {
    
      color: #000;
    
    }
    
    /* Contains the main page content. When using a mutliple column layout the margins will be set to account for
    
     the floated columns' width, margins, and padding. */
    
    #outerWrapper #contentWrapper #content {
    
      padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
    
    }
    
    #outerWrapper #footer {
    
      text-align:center;
    
      background-color: #f4f2fc;
    
      border-top: solid 1px #9ea3aa; /* Sets the top border properties for an element using shorthand notation */
    
      padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
    
    }
    
    /* navigation */
    
    .navbar {
    
    	
    
    	position:relative;
    
    	
    
    	left:5px;top:50px;
    
    	text-decoration:none;
    
    	
    
    }
    
    ul#navlist
    
    {
    
    margin-left: 0;
    
    padding-left: 0;
    
    white-space: nowrap;
    
    text-decoration:none;
    
    }
    
    
    
    #navlist li
    
    {
    
    display: inline;
    
    list-style-type: none;
    
    text-decoration:none;
    
    }
    
    
    
    #navlist a { padding: 3px 10px; }
    
    
    
    #navlist a:link, #navlist a:visited
    
    {
    
    color: #fff;
    
    background-color: #036;
    
    text-decoration: none;
    
    }
    
    
    
    #navlist a:hover
    
    {
    
    color: #fff;
    
    background-color: #369;
    
    text-decoration: none;
    
    }
    
    

     

    I am using CSS Sculptor but the navigation code was added to the stylesheet.

All Replies