Cannot get image to appear in floatbox

Page: 1

Author Post
beaver1
Guest
Hi, I have been trying for hours to get my image to appear in floatbox on a page and it is not working, I am testing it on my computer before putting it on a website. Here is the code to my page so far. I am using Dreamweaver CS3 to make it.

<!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 type="text/css" rel="stylesheet" href="/floatbox/floatbox.css" />
<script type="text/javascript" src="/floatbox/floatbox.js"></script>

</head>

<body>

<a href="beaver-256x256.jpg" rel="floatbox">beaver</a>

</body>
</html>
Administrator
Registered: Aug 2008
Posts: 3382
This is almost certainly because the path references in the include lines for floatbox.css and floatbox.js don't match reality. I suspect, but don't know, that when you say "testing it on my computer" you mean running the html files directly from the file system and not from a locally installed web server. In this case, your include paths need to match your file system paths. When running straight from a file system, you're best off using relative paths to find things. So if your quoted page is adjacent to the floatbox folder (that is, both that page and the floatbox folder are in the folder you consider to be the root of your site), take the leading "/" character off the two floatbox include paths. If your page is down the folder tree one level, use "../floatbox/flo...". Etc.

If you install a local web server for testing you will be using an environment more like what you will be publishing to and you wouldn't be wasting all this time futzing around with file system paths.

Cheers...

Page: 1