Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » some VERY basic HTML help required!!
Closed Thread
Old 04-16-2007, 04:06 AM   #1 (permalink)
 
Monster Techie

Join Date: Jan 2005

Posts: 1,019

VIII

Default some VERY basic HTML help required!!

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
__________________
Sig reinstated. SigSanta
VIII is offline  
Old 04-16-2007, 07:12 PM   #2 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default Re: some VERY basic HTML help required!!

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

__________________
Greg is offline  
Old 04-17-2007, 12:44 AM   #3 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: some VERY basic HTML help required!!

Quote:
Originally Posted by Greg View Post
If the html page is located in /var/www/html/ on the server then your img tags should look like this:
HTML Code:
<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.
__________________

Need website help? PM me!
CrazeD is offline  
Old 04-17-2007, 12:55 PM   #4 (permalink)
synergy's Avatar
 
Monster Techie

Join Date: Mar 2005

Location: Somewhere between a 1 and a 0

Posts: 1,677

synergy will become famous soon enoughsynergy will become famous soon enough

Send a message via MSN to synergy Send a message via Yahoo to synergy Send a message via Skype™ to synergy
Default Re: some VERY basic HTML help required!!

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"

__________________

Windows 7 Professional 64-bit
HTPC: Phenom II X4 920 | Biostar TA790GX XE mATX w/ ATI HD 3300 IGP | 4 GB Dominators DDR2 1066
LG Blu-Ray/HD-DVD ROM + DVD RW | WD Caviar 1 TB | 250 GB Cuda | Antec Veris Fusion Black HTPC Case
Logitech diNovo Edge KB | Win7 Pro 64-bit

3dMark06 23,159 | 3dMark Vantage 23,579 | TF2 Stats Page
synergy is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Html Korubi Off Topic Discussion 2 04-01-2007 02:04 PM