Skip navigation
onewaysoldier
Currently Being Moderated

Png files referenced in css not displaying in Chrome & Firefox after after PUT

May 11, 2012 1:33 PM

Tags: #png #firefox #css #code #chrome

I'm new to dreamweaver but I've got a techy / software background so feel free to speak geek.

 

I've been tasked to create a simple splash screen for an existing intrenal website for my company.

 

I've been able to put page together in DW and sucessfully preview in Chrome, Firefox, & IE.  After I PUT files on the webserver (under an existing virtual directory in IIS) I'm bumping into a problem where I'm not able to see a the three png files I've got embedded into the .css sytle sheet fro the header, container, and footer sections.  Here's a look at the html & css for the page.  Any recommendations on how I could code this better or fix the problem?  Your help will be very much appreciated.

 

The site was originally built off a template so the comments in the .css are from the original author of the template.

 

<!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="/CognosSplashScreen/oneColFixCtrHdr.css" rel="stylesheet" type="text/css" />

<style type="text/css">

body {

          background-color: #000;

          background-image: url(/CognosSplashScreen/bg.jpg);

          background-repeat: no-repeat;

}

</style>

</head>

 

 

<body>

 

 

<div class="container">

  <div class="header">IBM Cognos - Enterprise Business Portal (EBP)</div>

  <div class="content">

    <h1><img src="/CognosSplashScreen/Wrench Sprocket.png" width="215" height="164" align="left" />EBP is offline</h1>

    <p>The IBM Cognos EBP has been taken offline for scheduled maintenance. Services will be restored on Wednesday, May the 2nd at 7:00 AM.    </p>

    <h3>Maintenance Details</h3>

    <p>We're currently in the process of upgrading from IBM Cognos BI version 8.3 to the most current 10.1.1. To take a look at some of the new features you'll experinece we've put together a brief overview you can download by <a href="#">clicking here</a>.</p>

    <p>10.1.1 training is available to for all users. Take a look at the list of available courses get yourself, your team, or department enrolled in a class today.    <!-- end .content --></p>

  </div>

  <div class="footer">

    <p> </p>

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

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

</body>

</html>

 

 

Here's the .css

 

@charset "utf-8";

body {

          font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;

          background: #42413C;

          margin: 0;

          padding: 0;

          color: #000;

}

 

 

/* ~~ Element/tag selectors ~~ */

ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */

          padding: 0;

          margin: 0;

}

h1, h2, h3, h4, h5, h6, p {

          margin-top: 0;           /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */

          padding-right: 45px;

          padding-left: 45px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */

}

a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */

          border: none;

}

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */

a:link {

          color: #42413C;

          text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */

}

a:visited {

          color: #6E6C64;

          text-decoration: underline;

}

a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */

          text-decoration: none;

}

 

 

/* ~~ this fixed width container surrounds the other divs ~~ */

.container {

          width: 980px;

          margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */

          background-image: url(/CognosSplashScreen/PageBodyLight_02.png);

}

 

 

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */

.header {

          background-image: url(/CognosSplashScreen/HeaderBubbles_02.png);

          padding-top: 57px;

          color: #CCC;

          font-weight: bold;

          padding-left: 97px;

          padding-bottom: 30px;

 

 

}

 

 

/* ~~ This is the layout information. ~~

 

 

1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

 

 

*/

 

 

.content {

          padding: 10px 0;

}

 

 

/* ~~ The footer ~~ */

.footer {

          background-image: url(/CognosSplashScreen/footer_02.png);

          padding-top: 5px;

}

 

 

/* ~~ miscellaneous float/clear classes ~~ */

.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. The floated element must precede the element it should be next to on the page. */

          float: left;

          margin-right: 8px;

}

.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */

          clear:both;

          height:0;

          font-size: 1px;

          line-height: 0px;

}

 
Replies
  • Currently Being Moderated
    May 11, 2012 2:16 PM   in reply to onewaysoldier

    I know this is stating the obvious but did the .png files actually get uploaded and are you confident that the paths in the CSS that link to the images are accurate?

     

    Martin

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2012 2:30 PM   in reply to onewaysoldier

    If I understand correctly, images are in the same folder as your CSS file.

    CognosSplashScreen/

     

    If yes, change this in your CSS file:

     

    background-image: url(/CognosSplashScreen/PageBodyLight_02.png);

     

    to this:

     

    background-image: url(PageBodyLight_02.png);

     

    Repeat on other background-image urls.  Save CSS files and upload to server.

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2012 2:34 PM   in reply to onewaysoldier

    CSS for images coded on the Web page itself is pathed relative to that Web page. CSS for images used by the external CSS file is pathed relative to the CSS file location.
    If this is the link to the css file from the Web page... go to "CognosSplashScreen" subfolder and get the "oneColFixCtrHdr.css"

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

    .... and you don't need the leading "/" by the way.
    then relative to that css file, which is already in the "CognosSplashScreen" subfolder, the path to the "HeaderBubbles_02.png" is just

    background-image: url(HeaderBubbles_02.png);

    not:

    background-image: url(/CognosSplashScreen/HeaderBubbles_02.png);

    and so forth for other image paths.

    Best wishes,

    Adninjastrator

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points