1 Reply Latest reply on Apr 8, 2010 7:02 PM by jwnickola

    CSS lost when site is published.

    jwnickola

      I am very new to Dreamweaver and web design in general. I am creating a site in Dreamweaver CS4 and uploading it using an FTP. I have created a home page (without functionality) and it looks exactly how I want it to look both in the design page and live view. However, once I upload it to the host, it seems to lose the CSS. Its basically ignoring the divs and placing content in a linear fashion. Here is the source code:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml">

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <title>Untitled Document</title>

      <link href="wolfpacksite.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]-->

      <style type="text/css">

      <!--

      body,td,th {

      color: #FFF;

      }

      body {

      background-color: #000;

      margin-left: 100px;

      margin-top: 20px;

      margin-right: 100px;

      margin-bottom: 20px;

      }

      -->

      </style></head>

       

      <body class="thrColFixHdr">

       

      <div id="container">

        <div id="header"><img src="images/header.jpg" alt="Header" width="782" height="289" hspace="200" />

          <!-- end #header -->

        </div>

        <div id="sidebar1">

        <img src="images/homebutton.jpg" width="200" height="41" alt="Home" /><img src="images/schedulebutton.jpg" width="200" height="47" alt="Schedule" />

        <img src="images/rosterbutton.jpg" width="200" height="47" alt="Roster" /><img src="images/newsbutton.jpg" width="200" height="47" alt="News" /><img src="images/historybutton.jpg" width="200" height="47" alt="History" /><img src="images/cheerbutton.jpg" width="200" height="47" alt="Cheer" /><img src="images/sponsorsbutton.jpg" width="200" height="46" alt="Sponsor" /><img src="images/locationsbutton.jpg" width="200" height="46" alt="Locations" /><img src="images/recruitingbutton.jpg" width="200" height="47" alt="Recruiting" /><img src="images/fourmsbutton.jpg" width="200" height="47" alt="Forum" /><img src="images/shopbutton.jpg" width="200" height="47" alt="Shop" /><img src="images/contactusbutton.jpg" width="200" height="47" alt="Contact" />

        <!-- end #sidebar1 -->

        </div>

        <div id="sidebar2">    <img src="images/facebookbutton.jpg" width="30" height="29" alt="Facebook" /><img src="images/twitterbutton.jpg" width="30" height="29" alt="Twitter" /><img src="images/myspacebutton.jpg" width="30" height="29" alt="Myspace" /><img src="images/cafepressbutton.jpg" width="30" height="29" alt="Cafepress" />

          <!-- end #sidebar2 -->

      <img src="images/coorsside.jpg" width="200" height="117" alt="Coors" /><img src="images/fuzeside.jpg" width="200" height="116" alt="Fuze" /><img src="images/jewelryside.jpg" width="200" height="116" alt="Joseph Michael Jewelers" /><img src="images/marinaside.jpg" width="200" height="116" alt="West Allen Marina" /><img src="images/remaxside.jpg" width="200" height="115" alt="Remax" /><img src="images/sunroomside.jpg" width="200" height="199" alt="Sunrooms" /> </div>

        <div id="mainContent">

          <h2>Levesque Inaugural Inductee to Wolfpack Hall of Fame</h2>

          <p><img src="images/levesque.jpg" alt="Jim Levesque" width="200" height="267" align="right" />After capping a decade long career with an MVP award-winning season in 2009, linebacker Jim Levesque has been named the first member of the Wolfpack Hall of Fame. Levesque has been the centerpiece of the Wolfpack defense in each of his seasons with the team and was the key cog in helping the team  finish with the #1 ranked and championship winning defense in 2009. The Wolfpack will surely miss the perennial all-star and two-time NEFL Defensive MVP's veteran leadership both on and off the field.</p>

          <h2> </h2>

          <h2>Wolfpack Begin Preseason Practices</h2>

          <p>The New Hampshire Wolfpack are coming off a 2009 season that saw the team win its 1st NEFL Championship, rank #1 in defense, and #3 in offense. Probably not much work to be done heading into to 2010, right? Not so if you ask Wolfpack Head Coach Jim Harmon. &quot;We truly believe that games are won through preparation. Any chance we have at success this year is going to come because of what we put in on the practice field. That starts now.&quot;</p>

          <p>This is a football team, but you may not know it by watching the first hour of practice. Footballs, helmets, and shoulderpads are nowhere to be find but harnesses and conditioning courses are aplenty. &quot;Its kind of tough but you just gotta push through it to get to the fun stuff,&quot; said defensive end Dennis Hill.</p>

          <p>Kind of tough is one way to describe it but the slew of players either revisiting their lunch or gasping for air may put it differently. &quot;Honestly, it's a little crazy,&quot; said quarter back Jim Sanford, &quot;but it's worth it. We have a big bullseye on us going into this year so some sweat now will make things easier this Summer.&quot;</p>

          <p>The Wolfpack will continue preaseason practices through to the end of May each Sunday 12:30 p.m at Manchester West High School. Any interested players or coaches should contact jharmon@nhwolfpack.org for more info.</p>

        <!-- end #mainContent --></div>

      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />

        <div id="footer">

          <p>Footer</p>

        <!-- end #footer --></div>

      <!-- end #container --></div>

      </body>

      </html>

      And the CSS:
      @charset "utf-8";
      body  {
      font: 100% Verdana, Arial, Helvetica, sans-serif;
      background: #666666;
      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;
      }
      .thrColFixHdr #container {
      width: 1182px; /* the auto margins (in conjunction with a width) center the page */
      border: 0px none #000000;
      text-align: left; /* this overrides the text-align: center on the body element. */
      background-color: #000;
      height: auto;
      margin-top: 0;
      margin-right: auto;
      margin-bottom: 0;
      margin-left: auto;
      }
      .thrColFixHdr #header {
      padding: 0;  /* 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. */
      background-color: #000;
      height: auto;
      width: 1182px;
      }
      .thrColFixHdr #header h1 {
      margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
      padding: 0px; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
      height: auto;
      width: 1182px;
      background-color: #000;
      }
      .thrColFixHdr #sidebar1 {
      float: left; /* since this element is floated, a width must be given */
      width: 200px; /* the background color will be displayed for the length of the content in the column, but no further */
      padding: 0px; /* padding keeps the content of the div away from the edges */
      height: auto;
      background-color: #000;
      }
      .thrColFixHdr #sidebar2 {
      float: right; /* since this element is floated, a width must be given */
      width: 200px; /* the background color will be displayed for the length of the content in the column, but no further */
      padding: 0px; /* padding keeps the content of the div away from the edges */
      height: auto;
      background-color: #000;
      }
      .thrColFixHdr #mainContent {
      padding-top: 0;
      padding-right: 10px;
      padding-bottom: 0;
      padding-left: 10px;
      margin-top: 0;
      margin-right: auto;
      margin-bottom: 0;
      margin-left: 200px;
      background-color: #000;
      height: auto;
      width: 975px;
      }
      .thrColFixHdr #footer {
      padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
      background:#DDDDDD;
      }
      .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;
      }.thrColFixHdr #container #mainContent p {
      font-size: 120%;
      }
      I'm sure it is a very easy fix for regulars like you but this is all a little daunting to a newb like me. Thanks so much for any help you can offer.