Can't figure out bug...new to CSS

Discussion in 'CSS' started by Strat79, Jun 14, 2008.

  1. #1
    I'm using a three-column fixed layout, and am trying to align the text at the top. It aligns correctly in Firefox, Opera, Safari, but not in Internet Explorer 7.
    http://www.uiowa.edu/~socialwk/index2.html

    Here's the css...

    @charset "utf-8";
    body  
    {
    	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    	padding: 0;
    	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    	color: #000000;
    	background-color: #70729b;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	height: 100%;
    }
    img
    {  
    	border-style: none;
    }
    li.newbullet 
    {
    	list-style-image:url(bullet.gif);
    	line-height: 22px;
    }
    .white_text 
    {
    	font-size: 10px;
    	color: #FFFFFF;
    }
    .body_text 
    {
    	font-size: 12px;
    	color: #000000;
    	line-height: 22px;
    }
    .link:hover 
    {
    	color: #000000;
    	border-top-width: thin;
    	border-right-width: medium;
    	border-bottom-width: 2px;
    	border-left-width: medium;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: none;
    	border-top-color: #000000;
    	border-bottom-color: #8b7164;
    	background-color: #FFE6D9;
    }
    .link 
    {
    	font-size: 12px;
    	font-weight: bold;
    	color: #52425f;
    	font-style: normal;
    	text-decoration: none;
    }
    .link3:hover 
    {
    	color: #000000;
    	border-top-width: thin;
    	border-right-width: medium;
    	border-bottom-width: 2px;
    	border-left-width: medium;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: none;
    	border-top-color: #000000;
    	border-bottom-color: #8b7164;
    	background-color: #FFE6D9;
    	font-style: italic;
    }
    .link3 
    {
    	font-size: 12px;
    	font-weight: bold;
    	color: #52425f;
    	font-style: italic;
    	text-decoration: none;
    }
    .link2:hover 
    {
    	color: #000000;
    	background-color: #FFFFFF;
    }
    .link2 
    {
    	font-size: 12px;
    	font-weight: bold;
    	color: #fda597;
    	font-style: normal;
    	text-decoration: none;
    }
    .thrColFixHdr #container 
    {
    	width: 760px; /* the auto margins (in conjunction with a width) center the page */
    	border: 1px solid #000000;
    	text-align: left; /* the auto margins (in conjunction with a width) center the page */
    	background-color: #ffffff;
    	background-position: top;
    	height: 100%;
    } 
    .thrColFixHdr #header 
    {
    	background-color: #000000;
    	padding-top: 0;
    	padding-right: 0px;
    	padding-bottom: 0;
    	padding-left: 0px;
    } 
    .thrColFixHdr #header h1 
    {
    	margin: 0;
    	padding: 0px;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: none;
    	border-left-style: none;
    }
    .thrColFixHdr #sidebar1 
    {
    	float: left; /* since this element is floated, a width must be given */
    	width: 200px;
    	background-color: #000000;
    	margin: 0px;
    	padding: 0px;
    	height: 100%;
    	clear:left;
    }
    .thrColFixHdr #sidebar1 h1 
    {
    	margin: 0;
    	padding: 0px;
    }
    .thrColFixHdr #sidebar2 
    {
    	float: right; /* since this element is floated, a width must be given */
    	width: 140px; /* padding keeps the content of the div away from the edges */
    	padding-top: 0px;
    	padding-right: 10px;
    	padding-bottom: 0px;
    	padding-left: 10px;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: solid;
    	border-top-color: #000000;
    	border-right-color: #000000;
    	border-bottom-color: #000000;
    	border-left-color: #000000;
    	background-color: #E0E0E0;
    	height: 100%;
    	clear:right;
    }
    .thrColFixHdr #sidebar2 h1 
    {
    	margin: 0;
    	padding: 0px;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: none;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	border-top-color: #000000;
    	border-right-color: #000000;
    	border-bottom-color: #000000;
    	border-left-color: #000000;
    	font-family: Georgia, "Times New Roman", Times, serif;
    	text-transform: none;
    	font-variant: small-caps;
    	font-weight: bold;
    	letter-spacing: .5em;
    	clear: both;
    }
    .thrColFixHdr #mainContent 
    {
    	width: 350px;
    	margin-right: 160px;
    	margin-left: 200px;
    	padding-top: 0;
    	padding-right: 10px;
    	padding-bottom: 0;
    	padding-left: 10px;
    	height: 100%;
    } 
    .thrColFixHdr #mainContent h1 
    {
    	margin: 0;
    	padding: 0px;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: none;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	border-top-color: #000000;
    	border-right-color: #000000;
    	border-bottom-color: #000000;
    	border-left-color: #000000;
    	font-family: Georgia, "Times New Roman", Times, serif;
    	text-transform: none;
    	font-variant: small-caps;
    	font-weight: bold;
    	letter-spacing: .5em;
    }
    .thrColFixHdr #footer 
    {
    	border-top-width: thin;
    	border-right-width: thin;
    	border-bottom-width: thin;
    	border-left-width: thin;
    	border-top-style: solid;
    	border-top-color: #000000;
    	border-right-color: #000000;
    	border-bottom-color: #000000;
    	border-left-color: #000000;
    	padding-top: 0;
    	padding-right: 10px;
    	padding-bottom: 0;
    	padding-left: 10px;
    	text-align: center;
    	background-color: #000000;
    	margin: 0px;
    } 
    .thrColFixHdr #footer p 
    {
    	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
    	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    }
    .fltrt 
    { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
    	float: right;
    	margin-left: 8px;
    }
    .fltlft 
    { /* this class can be used to float an element left in your page */
    	float: left;
    	margin-right: 8px;
    }
    .clearfloat 
    { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
    	clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    }
    Code (markup):
    And here is the html file...
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>The University of Iowa School of Social Work</title>
    <!-- Deluxe Menu -->
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    <script type="text/javascript">var dmWorkPath = "data.files/";</script>
    <script type="text/javascript" src="data.files/dmenu.js"></script>
    <!-- (c) 2007, http://deluxe-menu.com --> 
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <!--[if IE 5]>
    <style type="text/css"> 
    /* place css box model fixes for IE 5* in this conditional comment */
    .thrColFixHdr #sidebar1 { width: 180px; }
    .thrColFixHdr #sidebar2 { width: 190px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css"> 
    /* place css fixes for all versions of IE in this conditional comment */
    .thrColFixHdr #sidebar2, .thrColFixHdr #sidebar1 { padding-top: 30px; }
    .thrColFixHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    </head>
    <body class="thrColFixHdr">
    <div id="container">
      <div id="header">
       <a href="http://www.uiowa.edu/~socialwk"><img src="Purchased/header.gif" width="760" height="200" alt="header" /></a>
      <!-- end #header --></div>
      <div id="sidebar1"><h1>
    <script type="text/javascript" src="data.files/data.js"></script> 
        <!-- end #sidebar1 --></h1></div>
      <div id="sidebar2">
        <h1>News</h1>
        <p><a href="NursingHomeResource/index.html" class="link3">Resource Page for Nursing Home Social Workers</a><br />
          ------------------------------<br />
          <span class="body_text"><em>Family Centered Practice: A Conference and 30th Anniversary Celebration</em></span><br />
          <a href="http://www.uiowa.edu/~socialwk/30thConferenceCall/Save%20the%20Dates%20-%20FCP.doc" class="link3">Save The Date</a><br />
          <a href="http://www.uiowa.edu/~socialwk/30thConferenceCall/30thAnnivConfFlyer.pdf" class="link3">Conference Registration Info</a><br />
          ------------------------------<br />
          <a href="http://www.uiowa.edu/~socialwk/record/Record.html" class="link3">The Record</a><br />
          ------------------------------<br />
          <span class="body_text"><em>Thinking About a Career in Social Work?</em></span> <a href="http://www.bls.gov/oco/ocos060.htm" class="link3">Click Here</a><br />
          ------------------------------<br />
          <a href="http://www.uiowa.edu/~socialwk/creative_writing-seminar/creative_writing_2008.doc" class="link3">Creative Writing Seminar</a><br />
          ------------------------------<br />
          <a href="http://www.uiowa.edu/~socialwk/PPP.htm" class="link3">Practicum Parnership Program<br />
          </a><br />
          <!-- end #sidebar2 -->
        </p>
      </div>
      <div id="mainContent">
        <h1>Welcome</h1>
        <p><img src="6.jpg" alt="UI School of Social Work" width="342" height="191" /><br />
        <span class="body_text">The University of Iowa School of Social Work serves the entire state of Iowa, offering the BASW, MSW, MSW/PhD, and PhD in Social Work. The MSW is offered in four sites.</span></p>
        <ul>
          <li class="newbullet"><a href="index.html" class="link">Iowa City</a></li>
          <li class="newbullet"><a href="sioux_city/siouxcity.htm" class="link">Sioux City</a></li>
          <li class="newbullet"><a href="des_moines/desmoines.html" class="link">Des Moines</a></li>
          <li class="newbullet"><a href="quad_cities/quadcity.html" class="link">Quad Cities</a></li>
          <li class="newbullet"><a href="Ottumwa/Ottumwa.html" class="link">Ottumwa</a></li>
        </ul>
        <p class="body_text"> Faculty's research, teaching and service interests are clustered in five areas.</p>
        <ul>
          <li class="newbullet"><a href="Aging.html" class="link">Life Course Development and Aging</a></li>
          <li class="newbullet"><a href="Inequality.html" class="link">Diversity, Inequality, and Social Justice</a></li>
          <li class="newbullet"><a href="Family.html" class="link">Family &amp; Child Welfare, Family Violence, &amp; Family-Centered Practice</a></li>
          <li class="newbullet"><a href="Mental.html" class="link">Health &amp; Mental Health Promotion and Substance Abuse Prevention &amp; Treatment</a></li>
          <li class="newbullet"><a href="Rural.html" class="link">Organizations, Communities, and Rural Perspectives</a>
          </li>
        </ul>
      </div>
    	<div id="footer">
               <span class="white_text">The University of Iowa School of Social Work ©2008</span>    <a href="http://www.uiowa.edu/" class="link2" title="Go to The University of Iowa homepage">The University of Iowa</a> <span class="white_text">® All rights reserved.</span>    <a href="http://validator.w3.org/check?uri=referer" class="link2" title="Check the validity of this site's XHTML">xhtml</a>
        <a href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A//www.uiowa.edu/~socialwk/index2.html&amp;profile=css21&amp;usermedium=all&amp;warning=1&amp;lang=en" class="link2" title="Check the validity of this site's CSS">css</a>
        <a href="http://www.contentquality.com/fulloptions.asp?BROWSE_EMUL=Cynthia+1.0&amp;exclne=&amp;exclns=&amp;rptmode=2&amp;RunJob=Test+your+site&amp;url1=http%3A//www.uiowa.edu/%7Esocialwk/index.html&amp;EMSG=%0D%0A%3Cbr%3EThe+maximum+allowed+URL+submissions+has+been+reached+for+the+Host%3A+www.uiowa.edu.%3Cbr%3EOnly+1+submission+for+a+host+is+allowed+in+1+minute." class="link2" title="Check the validity of this site's accessibility">cc</a><br />
            <span class="white_text">This site is best viewed in current CSS compliant browsers (</span>    <a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx" class="link2" title="Link to download Internet Explorer 7">Internet Explorer 7</a>, 
           <a href="http://www.mozilla.com/en-US/firefox/" class="link2" title="Link to download Mozilla Firefox 2">Mozilla Firefox 2</a>,
           <a href="http://www.opera.com/" class="link2" title="Link to download Opera 9">Opera 9</a>,       <a href="http://www.apple.com/safari/download/" class="link2" title="Link to download Safari">Safari</a><span class="white_text">)
           </span>
        <!-- end #footer --></div>
    <!-- end #container --></div>
    </body>
    </html>
    Code (markup):
    I could use any help I could get. Thanks.
     
    Strat79, Jun 14, 2008 IP
  2. motex

    motex Peon

    Messages:
    234
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Which text are you referring to?
    How would you like it aligned? Explain a bit more....
     
    motex, Jun 14, 2008 IP
  3. Strat79

    Strat79 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm referring to the header text in each of the columns. If you look at the page in internet explorer, it appears that the text in the left (the menu) and right column ("news") is aligning below the baseline for the text in the center column ("welcome"). Id like for all the columns to align top.
     
    Strat79, Jun 14, 2008 IP
  4. Strat79

    Strat79 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    does anyone have any idea?
     
    Strat79, Jun 16, 2008 IP