Skip navigation
jsmcrawler
Currently Being Moderated

Won't display background image in browser.

Jul 17, 2012 10:20 AM

Tags: #image #adobe #cs5.5 #images #code

My background image displays in dreamweaver and in the live view but it doesn't display in the browser when I try to view in a browser or when I publish the website.  I have spend hours looking for a solution and I am not sure what the problem is. I have checked the code on the following websites and it comes out ok:

http://jigsaw.w3.org/css-validator/validator

http://validator.w3.org/check

 

I have also tried my code with and without the overflow: hidden;  under #container where the image should be displayed.  (i was trying a new way to design -ie without basic grid and floating everything so the container can be removed if needed)

 

here is my code. Please help!!! thank you in advance!!!

 

 

<!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>Jan Kardys' Literary Agency</title>

<style type="text/css">

#header {

    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;

    float: left;

    width: 930px;

    color: #3F9;

}

#Menu_bar {

    float: left;

    width: 190px;

}

#Page_Content {

    float: right;

    width: 725px;

    height: 500px;

}

#footer {

    float: left;

    width: 930px;

}

#Main_content {

    float: left;

    width: 510px;

}

#xtra_content {

    float: right;

    width: 190px;

}

#container {

    width:  930px;

    margin: 0 auto;

    background-image: url(/Images/Parchment.gif);

    overflow: hidden;

}

</style>

<script src="file:///C|/Users/james/Documents/DREAMWEAVER SITES/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

<link href="file:///C|/Users/james/Documents/DREAMWEAVER SITES/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

<style type="text/css">

body {

   

}

</style>

</head>

 

<body>

<div id= "container">

<div id="header"><h1>Jan kardy's Literary Agency</h1></div>

<div id="Menu_bar">

  <ul id="Vertical_menubar" class="MenuBarVertical">

    <li><a href="#">Home</a></li>

    <li><a href="#">About Jan Kardys</a></li>

    <li><a class="MenuBarItemSubmenu" href="#">Rescources</a>

      <ul>

        <li><a class="MenuBarItemSubmenu" href="#">Education Connection</a>

       

        </li>

        <li><a href="#">Submission Guidelines</a></li>

        <li><a href="#">First Steps to Publishing</a></li>

        <li><a href="http://advancenetworkingunicorn.blogspot.com/">Advanceced Networkinig Blog</a></li>

        <li><a href="#">Library &amp; Publishing Events</a></li>

</ul>

    </li>

    <li><a href="#">Client Links</a></li>

    <li><a href="#">Art Gallery</a></li>

    <li><a href="#">Contact Jan Kardys</a></li>

  </ul>

</div>

<div id="Page_Content">

  <div id="Main_content">Content for  id "Main_content" Goes Here</div>

  <div id="xtra_content"><h3>News &amp; Events

    </h3>

    <p><a title="http://scotlandpubliclibrary.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://scotlandpubliclibrary.org/">Scotland Public Library</a>, Scotland, CT April 21, 2011 6-8pm<br />

  </p>

    <p><a title="http://www.plymouthct.us/library.htm" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.plymouthct.us/library.htm">Plymouth CT Library</a>, Plymouth, CT April 30, 2011 10am<br />

    </p>

    <p><a title="http://www.hplct.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.hplct.org/">Hartford Public Library</a>, Hartford, CT May 7, 2011 10am<br />

    </p>

    <p><a title="http://www.middleburghlibrary.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.middleburghlibrary.org/">Middleburgh Library</a>, Middleburgh, NY May 14, 2011 1pm<br />

    </p>

    <p><a title="http://dewlib.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://dewlib.org/">Dewitt Community Library</a>, Dewitt, NY June 21, 2011 7pm<br />

    </p>

    <p><a title="http://gilfordlibrary.org/gpl/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://gilfordlibrary.org/gpl/">Gilford Public Library</a>, Gilford, NH July 7, 2011 6:30-7:30pm<br />

    </p>

    <p><a title="http://www.athollibrary.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.athollibrary.org/">Athol Public Library</a> Athol, MA July 14, 2011 5:30pm<br />

    </p>

    <p><a title="http://www.goshenpublib.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.goshenpublib.org/">Goshen Public Library</a> Goshen, CT July 23, 2011 11am<br />

    </p>

    <p><a title="http://columbiactlibrary.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://columbiactlibrary.org/">Saxton B. Little Free Library</a>, Columbia, CT July 26, 2011 6:45pm<br />

    </p>

    <p><a title="http://hampden-library.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://hampden-library.org/">Hampden Public Library</a>, Hampden, MA Sept. 10, 2011 10:30am<br />

    </p>

    <p><a title="http://fortlee.bccls.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://fortlee.bccls.org/">Fort Lee Public Library</a>, Fort Lee, NJ Sept. 14, 2011 7:00pm<br />

    </p>

    <p><a title="http://prosserlibrary.info/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://prosserlibrary.info/">Prosser Public Library</a>, Bloomfield, CT October 3, 2011 6:00-8:00pm<br />

    </p>

    <p><a title="http://iwwg.org" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://iwwg.org">IWWG. org</a>, New York City, October 16, 2011 2:30-6pm<br />

    </p>

    <p><a title="http://www.hchlibrary.org/" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://www.hchlibrary.org/">Henry Carter Hull Library</a>, Clinton, CT October 24, 2011 6:30pm<br />

    </p>

    <p><a href="http://town.canton.ma.us/library" title="http://town.canton.ma.us/library">Canton Public Library</a>, Canton MA Janurary 7, 2012  2:00pm<br />

    </p>

    <p><a href="http://www.town.sturbridge.ma.us/Public_Documents/F0000F86A/library" title="http://www.town.sturbridge.ma.us/Public_Documents/F0000F86A/library">Joshua Hyde Library</a>, Sturbridge, MA March 24, 2012 10:30am<br />

    </p>

    <p>Otis Library Norwich, CT April 14, 2012 12:00am-2:00pm<br />

    </p>

  </div>

</div>

<div id="footer"> <h6>Webpage designed by James S. Molina</h6></div>

<script type="text/javascript">

var MenuBar1 = new Spry.Widget.MenuBar("Vertical_menubar", {imgRight:"/SpryAssets/SpryMenuBarRightHover.gif"});

</script>

</div></body>

</html>

 
Replies
  • Currently Being Moderated
    Jul 17, 2012 10:25 AM   in reply to jsmcrawler
     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 10:26 AM   in reply to jsmcrawler

    Could you please post a link to the uploaded version?

     

    I'm guessing that when you upload, the background image is not being accessed, maybe it shows an absolute path to your hard drive instead of to the uploaded image?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 10:27 AM   in reply to jsmcrawler

    What's the url?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 2:14 PM   in reply to jsmcrawler

    Your .js and .css links in your header are still pointing to your hard drive.

     

    ETA: It's very broken here. It may look right on your machine, but only because the links for those files are pointing to your machine, not the uploaded files.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 2:22 PM   in reply to jsmcrawler

    I'm guessing you have some conflicts in your CSS, however the CSS link on your page is not pointing to an uploaded file, but rather your hard drive.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 6:48 AM   in reply to jsmcrawler

    In regard to the files you currently have on your server, the links to your Spry menu files are still pointing to your local computer.  This is caused when a site has not yet been defined in Site Manager, so DW is forced to link them locally.

     

    To fix your page, just go into code view and remove the part of the link path that I have underlined and made BOLD.

     

    <script src="file:///C|/Users/james/Documents/DREAMWEAVER SITES/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

     

    <link href="file:///C|/Users/james/Documents/DREAMWEAVER SITES/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 9:27 AM   in reply to jsmcrawler

    >I changed that and it made the spry bar not work it just shows up as an unordered list.

     

    Your path is still not correct - it contains the word 'file'.

     

    "file: SpryAssets/SpryMenuBar.js"

     

    Change the path to use either document or site root relative paths.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 9:32 AM   in reply to jsmcrawler

    Not quite there James -

     

    You links now read

     

    <script src="file: SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

     

    <link href="file: SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />

     

    Remove the file: from both

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 10:39 AM   in reply to jsmcrawler

    Re: http://firsthelpamerica.us/

     

    James, without the correct links to the Menu files, you would have nothing but a list.

    Now that the links are correct in the head section, you have to troubleshoot the display flaws in your HTML code.

     

    If you have a working version elsewhere, copy that menu code into the page.

     

    Unless both sites are "defined" you will have link problems requiring you to check and correct in code view.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2012 2:14 PM   in reply to jsmcrawler

    James -

     

    You have a 3-level menu

     

    What level is "Library &amp; Publishing Events" supposed to be?

     
    |
    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