Advertisement

10.26.2007 at 12:03PM PDT, ID: 22920996
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

IE5,7(win) will not center my content properly, IE7 also gives me a bottom scrollbar

Asked by DragKng in Hypertext Markup Language (HTML), Miscellaneous Web Development, Cascading Style Sheets (CSS)

Tags: , ,

I have tried everything I could find, and still the content does not center properly.

I have text-align:center on everything as well as widths.  Placed the image on HTMl and BODY (this kind of works... but makes two mis-aligned backgounds) Checked/changed the doctype, no luck.

I think the main problem is that it IS, in fact, centering what I would like it to center (ie the main content in the browser window), but not moving the body's background image to center as intended.  It seems to be stretching the window to accomodate the size of the background image.  I know this because I am getting a scrollbar at the bottom of the browser.

THE background IMG is 1200X1046 (pixels) -

any help is appreciated.

CODE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><%= pagetitle %></title>

<LINK lang="fr" title="La documentation en Fran&ccedil;ais" type="text/html" rel="alternate" hreflang="fr" href="/french/index.asp">  
<link href="../css/globalt.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="../css/ie7t.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link href="../css/iehackst.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>

<body class="splash">
<div id="language"><span>
<a href="#">English</a>
</span></div>
<div id="container">
      
   
  <div id="logo"><img src="" alt="an image placeholder" width="576" height="80" />

  <!-- end #logo --></div>
 
  <div id="splashContent">
      
  <div class="quote"><p>&quot;"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. "
 &quot;<br /><span class="right"> - Dalton McGuinty</span></div>
    <div id="splashDescription">
   
    <p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
    <br />
    Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?</p>
          
    <!-- end #splashDescription --></div>
   
    <div id="splashNav">
          <ul>
                  <li><a href="#">menu item 1</a></li>
                     <li><a href="#">menu item 2</a></li>
            <li><a href="#">menu item 3</a></li>
            <li><a href="#">menu item 4</a></li>
            <li><a href="#">menu item 5</a></li>
            </ul>
       
    <!-- end #splashNav --></div>
    <div class="clear"></div>
      <!-- FOOTER -->
<div id="footerholder">
<div id="footer"><img src="" alt="images placeholder" width="120" height="29" class="left" /><p>Copyright stuff<br />
<a href="http://www.gov.on.ca/ont/navigation/NavigationController.jsp?PageName=General&amp;docid=004807&amp;lang=fr" target="_blank">link</a> | <a class="bottomnav" href="http://www.gov.on.ca/ont/navigation/NavigationController.jsp?PageName=General&amp;docid=004809&amp;lang=fr" target="_blank">link</a><br />
<a href="http://www.gov.on.ca/ont/portal/!ut/p/.cmd/cs/.ce/7_0_A/.s/7_0_252/_s.7_0_A/7_0_252/_l/fr?docid=004805" target="_blank">footer content</a> <br />
date<br /></p>
</div>
</div>
<!-- END FOOTER -->
<!-- end #splashContent -->
  </div>
  <!-- end #container --></div>
</body>
</html>

CSS - global
@charset "utf-8";

/* let's zero out everything - thanks to eric meyer - meyerweb.com*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
      margin: 0;
      padding: 0;
      border: 0;
      outline: 0;
      font-weight: inherit;
      font-style: inherit;
      font-size: 100%;
      font-family: inherit;
      vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
      outline: 0;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
      font-family: Verdana, Arial, Helvetica, sans-serif;
}

body {
      line-height: 1.8em; /* SET text attributes here */
      color: black;
      background: #ffffff;
}
p { line-height:1.4em;
      margin:0.7em 0.6em 0.9em 0.6em;
} /* SET text attributes here */

/*ol, ul {
      list-style: none;
}*/
/* tables still need 'cellspacing="0"' in the markup */
table {
      border-collapse: separate;
      border-spacing: 0;
}
caption, th, td {
      text-align: left;
      font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
      content: "";
}
blockquote, q {
      quotes: "" "";
}

/* ------------------default styling-------------------- */

/* PNG fix */
img {
      behavior:      url("iepngfix.htc");
      /* turns off gaps around images */
      border:      0
}

.smtxt { font-size: 80%; }

.regtxt { font-size: 100%; }

/* ---- HEADER TAGS ---*/

h1      {
      font-size:      140%;
      }

h2      {
      font-size:      130%;
      }

h3      {
      font-size:      125%;
      }

h4 {
      font-size:      120%;
      }

h5      {
      font-size:      110%;
      }

h6      {
      font-size:      105%;
      }

h1, h2, h3, h4, h5, h6      {
      font-family: Trebuchet MS, arial, sans-serif;
      font-weight: bold;
      color: #000;
      background-color: transparent;
      margin:      5px 0;
      }
      

code, tt, pre      {
      font: 12px "andale mono", monaco, courier, "courier new", monospace;
      color: #06c;
      background: transparent;
      }



/* ---- FLOATING --- */

.left {
      float:left;
}
      
.right {
      float:right;
}

.clear {
      clear: both;
}

/* ---- ACCESSIBILITY ---- */
     span.accesskey {
           text-decoration:none;
     }
     .hiddenaccess {
           position: absolute;
           top: -999em;
           left: -999em;
     }


/* ---- LINKS ---- */

/* default */

 #language a,
 a:link,
 a:visited,
 a:active {
        text-decoration: none;
        font-weight: bold;
        color: white;
    }
 a:hover {
        text-decoration: underline;
            color: yellow;
        }
            
/* default */            
            
#subBody a,
 a:link,
 a:visited,
 a:active {
      text-decoration: underline;
      font-weight: bold;
      color: #CC3300;
    }
 a:hover {
        text-decoration: underline;
            color: purple;
        }

#splashDescription a,
a:link,
 a:visited,
 a:active {
 
 
 
 
 
 }
#splashNav a, #splashContent #splashDescription a.whitelink
    #splashNav a:link, #splashContent #splashDescription a:link.whitelink
    #splashNav a:visited, #splashContent #splashDescription a:visited.whitelink
    #splashNav a:active, #splashContent #splashDescription a:active .whitelink  {
        text-decoration: underline;
        font-weight: bold;
        color: #510000;
    }
#splashNav a:hover, #splashContent #splashDescription a:hover.whitelink {
        text-decoration: underline;
            color: #990000;
        }
            
#subPage .subPageHighlightBox a,
#subPage .subPageHighlightBox a:link,
#subPage .subPageHighlightBox a:visited,
#subPage .subPageHighlightBox a:active {
        text-decoration: underline;
        font-weight: bold;
        color: #eed077;
    }
#subPage .subPageHighlightBox a:hover {
        text-decoration: underline;
            color: white;
        }            
            
/* ---- LINKS ---- */

/* -------------***************************** PAGE/SITE SPECIFIC STYLES *******************************----------------------------------------------------------------- */

/* ---- language style --- language switcher required for internet sites  */

#language {
      font-size: 80%;
      width: 5.2em;
      padding: 5px;
      color: #FFFFFF;
      background-color: #590000;
      height: 1.6em;
      font-weight: bold;
      position: absolute;
      top: 0px;
      left: 77%;
      text-align:center;
      margin-bottom: 10px;
}

/* ---- language style ---*/

/* ------------- SPLASH page ----------------------------------------------------------------- */
body.splash  { /* sets font for page */
      background: #FFFFFF url(holder.jpg) no-repeat 50% 0; /* background image centered */
      background-position: top center;
      text-align: center;
}
.splash #container {
      width: 650px;  /* this will create a container 700px across */
      margin: 0 auto;
      text-align:center;
}
.splash #header {
      background: #DDDDDD;
      padding: 0 10px 0 20px;/* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
      width: 620px;  
      text-align:center;
}
.splash #header h1 {
      padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
      text-align:center;
}
.splash #logo {
      width: 650px;
      margin: 0 auto;
      text-align: center; /* fixes auto-margin error in ie7 */
      top: 366px;
      position: relative;
      line-height: 1.2em;
      background-color:#FFFFFF;
}

.splash #splashContent {
      width: 650px;
      top: 366px;
      margin: 0 auto;
      float: left;
      position: relative;
      text-align:center;
}
.splash #splashContent #splashDescription {
      width: 470px;
      margin: 0 0 0 40px;
      text-align: center;
      color: #FFFFFF;
      font-size: 80%;
      float: left;
      display: inline;
      background-color: #990000;
      background-image: url(../images/splashDescription_topL.gif);
      background-repeat: no-repeat;
      background-position: left top;
}
.splash #splashContent #splashDescription p {
      padding: 8px 12px;
      background-image: url(../images/splashDescription_bottomL.gif);
      background-repeat: no-repeat;
      background-position: left bottom;
      margin: 0;
      margin-bottom: 0;
      text-align:left;
}

.splash #splashContent #splashNav {
      width: 130px;
      padding: 0 0 0 10px;
      float: right;
      font-size: 85%;
      font-weight: bold;
      color: #5B0000;
      background-color:#FFFFFF;
}
.splash #splashContent #footer {
      clear: both;
      text-align:center;
      width: 600px;
}
#splashNav ul {
      margin: 0;
      padding: 6px 0;
      list-style-type: none;
      line-height: 1.6em;
      text-align: left;
      font-size: 90%;
      font-weight: bold;
}

#splashDescription div {
      
}

.quote {
      margin:0 0 0 40px;
      padding: 5px 5px 20px 5px;
      font-size: 80%;
      font-style: italic;
      color:#000000;
      font-weight:normal;
      display:block;
      width: 600px;
      background-color:#FFFFFF;
      text-align:center;
}

.quote p {
      margin: 3px;
      line-height: 1.2em;
}

/* ------------- SPLASH page ----------------------------------------------------------------- */








/* -------------- FOOTER -------------------- */

#footer {
      margin: 0px auto;
      padding: 0;
      width: 580px;
      clear: both;

}

#footer p {
      padding: 10px 10px 10px 30px; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
      text-align: left;
      float: right;
      font-size: 70%;
      color: #550000;
}

#footer img { float: left; margin-top: 20px; margin-left: 60px; display:inline;}

.splash #footer {
      width: 640px;
}

IE7 style sheet code
@charset "utf-8";
/* CSS Document */

.splash #container {
      margin-left: auto;
      margin-right: auto;
      text-align: center;
      width: 540px;
}

.splash #logo { width: 700px; background-color: transparent; text-align:center; }

.splash #splashContent {  }

.splash #splashContent #splashDescription {
      width: 470px;
      margin: 0 0 0 40px;
      text-align: center;
      color: #FFFFFF; }



.subPage p { color: #0033CC; }



Start Free Trial
[+][-]10.26.2007 at 12:36PM PDT, ID: 20158417

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Hypertext Markup Language (HTML), Miscellaneous Web Development, Cascading Style Sheets (CSS)
Tags: ie7, center, content
Sign Up Now!
Solution Provided By: NickVd
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12.27.2007 at 01:11AM PST, ID: 20533006

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628