0 Replies Latest reply on Jul 15, 2007 5:27 AM by Newsgroup_User

    CSS giving different results when defined locally, and when defined using an include file.

    Level 7
      In my experimental photo album page I originally defined the styles in a
      separate .CSS file. However this appeared to be incompatible with the
      requirement to have the session_start (); statement at the start of the file, so
      I then defined the styles locally. Now I have found that a style which gives
      padding to the right of an image no longer works in IE6, although Dreamweaver
      shows the expected result.

      I have made two very simple test files to demonstrate this:

      http://localhost/Corybas/Cydalba/Test/Test_page_8[1
      http://localhost/Corybas/Cydalba/Test/Test_page_8[2

      In Test_page_8[1].htm styles are defined by the include file ../Spl2.ccs, which
      is included using the following statement in the head:

      <link href="../Spl2.css" rel="stylesheet" type="text/css" />

      The include file reads:

      /* Test.css for Cydalba project */

      .img_left { float:left; border:none; padding-left:0; padding-bottom:0;
      padding-top:0; padding-right:10px; }

      p { font-family: "Times New Roman", Times, serif; color: #f00000;
      margin-bottom: 0.25em; margin-top: 0px; border: 0; }

      In Test_page_8[2].htm styles are defined locally, using the following lines at
      the start of file:

      <style type="text/css">
      /* Test.css for Cydalba project */

      .img_left { float:left; border:none; padding-left:0; padding-bottom:0;
      padding-top:0; padding-right:10px; }

      p { font-family: "Times New Roman", Times, serif; color: #f00000;
      margin-bottom: 0.25em; margin-top: 0px; border: 0; }
      </style>

      With IE6 Test_page_8[1] gives the expected padding between the images and the
      adjacent text, but Test_page_8[2] does not. The para definition appears to work
      correctly in both cases.

      Can anyone explain this?


      Clancy