some VERY basic HTML help required!!

Status
Not open for further replies.

VIII

Daemon Poster
Messages
1,019
OK heres the deal,

I created a website for a friend, but unfortunately the job didnt end there! He asked me to upload it onto his FTP. I have managed so far, however, I am getting the red 'X' squares where my images should be. Countless emails to the FTP provider ensure all my files are in the RIGHT place, which thus leads me to the conclusion thats there are problems in my coded hyperlinks. I've tried soo many different ways of coding the images but I just cant get it to work. The website was done in dreamweaver, and im pretty sure the problem lies in the directory linking - could you PLEASE offer some assistance as I'm clueless!!!

here is the current code:

<body background="../var/www/html/images/background.jpg">
<div id="Layer1" style="position:absolute; left:80px; top:263px; width:53px; height:30px; z-index:1"><a href="home.html"><img src="../var/www/html/images/button_one_home.jpg" width="48" height="26" border="0"></a></div>
<div id="Layer2" style="position:absolute; left:144px; top:263px; width:48px; height:30px; z-index:2"><a href="images.htm"><img src="../var/www/html/images/button_two_images.jpg" width="57" height="27" border="0"></a></div>
<div id="Layer3" style="position:absolute; left:216px; top:264px; width:68px; height:26px; z-index:3"><a href="driv_prof.htm"><img src="../var/www/html/images/button_three_driverprof.jpg" width="106" height="27" border="0"></a></div>
<div id="Layer4" style="position:absolute; left:334px; top:264px; width:84px; height:21px; z-index:4"><a href="video.htm"><img src="../var/www/html/images/button_four_videos.jpg" width="51" height="26" border="0"></a></div>
<div id="Layer5" style="position:absolute; left:398px; top:264px; width:71px; height:38px; z-index:5"><a href="points.htm"><img src="../var/www/html/images/button_five_points.jpg" width="50" height="26" border="0"></a></div>
<div id="Layer6" style="position:absolute; left:462px; top:263px; width:66px; height:20px; z-index:6"><a href="news.htm"><img src="../var/www/html/images/button_six_latestnews.jpg" width="86" height="28" border="0"></a></div>
<div id="Layer7" style="position:absolute; left:566px; top:263px; width:56px; height:28px; z-index:7"><a href="info.htm"><img src="../var/www/html/images/button_seven_dinfo.jpg" width="125" height="28" border="0"></a></div>
<div id="Layer8" style="position:absolute; left:710px; top:265px; width:37px; height:22px; z-index:8"><a href="sponsors.htm"><img src="../var/www/html/images/button_eight_sponsors.jpg" width="71" height="26" border="0"></a></div>
<div id="Layer9" style="position:absolute; left:796px; top:264px; width:43px; height:16px; z-index:9"><a href="contact.htm"><img src="../var/www/html/images/button_nine_contact.jpg" width="80" height="26" border="0"></a></div>
<div id="Layer10" style="position:absolute; left:890px; top:264px; width:35px; height:15px; z-index:10"><a href="links.htm"><img src="../var/www/html/images/button_ten_links.jpg" width="42" height="25" border="0"></a></div>
<img src="../var/www/html/images/template.jpg" width="1000" height="900">


The sitename is :: DriftinSA :: and I am almost positive that I have the directory right - ..(driftinsa.com)/var/www/html/images/file.jpg but they still aren't showing up.

This is giving me a giant headache, so if anyone can point me in the right direction I would be very thankful. I'm sure I've made a simple mistake somewhere!

Thanks!

VIII
 
If the html page is located in /var/www/html/ on the server then your img tags should look like this:
HTML:
<img src="images/example.jpg">
 
If the html page is located in /var/www/html/ on the server then your img tags should look like this:
HTML:
<img src="images/example.jpg">

Yup.

You've linked to the physical path on the hard drive, but not the virtual location.

Think of the "html" folder as the "root" folder.
 
Yea...there are two types of linking--relative and absolute. You are using absolute which means you are linking to the physical space (as said above). That would be the same as linking to
Code:
C:\My Documents\Web Site\images\myimage.jpg

Relative linking is done by linking to the relative directory. As said above that would be
Code:
"/images/myimage.jpg"
 
Status
Not open for further replies.
Back
Top Bottom