Solved

HTML Webpage need help!

Posted on 2014-03-28
10
190 Views
Last Modified: 2014-03-28
I have a web page I am working on and am stuck on the very first part. I need to insert a logo as an img and when i try it shows up as this cant get img to showw fully.  this is my code

<html>
<title>company that shall not be named</title>
<head><b><p><h2>company that shall not be named</h2></text></b></head>
<text><p>The future is here!</p></text>
<p>
<img border="0" src="/images/logo.jpeg" alt="greenerpc" width="304" height="228">

Help Please!!!
0
Comment
Question by:HDM
  • 5
  • 4
10 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39962238
Try...

src="~/images/logo.jpeg"

In either case, the presumption is that there's a folder called images under the root of the web site.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39962370
Make sure you can surf to /images/logo.jpeg which is yoursite.com/images/logo.jpeg
0
 

Author Comment

by:HDM
ID: 39962795
Scott fell (padas),

I am lost in your comment. Do you mean in my browser? If so, i am not able to do that. Please explain

HDM
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39962815
Your image code <img border="0" src="/images/logo.jpeg" alt="greenerpc" width="304" height="228"> is calling for a file called log.jpeg inside the folder called images that is the top level folder on your site.

If you site is www.mysite.com.  Then the top level folder called images will be www.mysite.com/images/    and the file we are looking for is logo.jpeg so putting it all together www.mysite.com/images/logo.jpeg.   If you can type that in your browser (changing mysite.com to your own site) and see the image, you are good.  If you can't, then your image is not where you think it is.    

You can log into your server or use ftp and look for a folder called images and in that folder a file called logo.jpeg.      Note that an image file can be jpeg, jpg (same file type as jpeg), .gif, .png.   Make sure everything is spelled correctly too.  Many times jpg and jpeg get substituted.

In short, make sure the file you are calling is on the server.
0
 

Author Comment

by:HDM
ID: 39962822
I found a mistake, but apparently not the only one.  My logo was in pictures and not images.  i still cant search and find it in my browser, though.  Could it be that i am using notepad++?

HDM
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39962839
I see your problem.  I looked at your screenshot you uploaded.  Your local html file is in c:/users/nate/documents/ folder.   This would mean to see your image, you would have to have a folder called images in your c drive like c:/images.  That is not practical.  

You can change your code to
<img border="0" src="images/logo.jpeg" alt="greenerpc" width="304" height="228">

Open in new window

and that may work locally depending on where your images folder is.

You may want to read up on absolute and  relative paths http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c44a.html

You should probably use localhost to test your sites.  I am not a windows person, but I think you have to install iis first http://technet.microsoft.com/en-us/library/cc731911.aspx

This will allow you to access your local files like http://localhost/mypage.html just as you do your site.

One of our Experts Karzkiss has a good video on this with one exception. He talks about turning on parent paths.  Leave that that off in production and testing.  I think this talks about asp pages, but it is good for html as well https://www.youtube.com/watch?v=MiA-ox2OkI4
0
 

Author Comment

by:HDM
ID: 39963001
So, i created a folder of the Cdrive called Images and put my logo in it.  i then changed my code to
<img border="0" src="/images/logo.jpeg" alt="greenerpc" width="304" height="228"> , but my out come is still the same. i still cant wrap my head around this

HDM
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39963009
Going back to  your file location.  Your html file is in c:/users/nate/documents/

Your image is accessing /images/logo.jpeg.    By using the slash in front, you are telling the browser to look for the image logo.jpeg in c:/images/ folder.    

IF your folder structure is like this

c:
  |- users
              |- nate
                        |-documents
                                            |-images
                                                          |-log.jpg
                                            |-mypage.html

Then try taking out the slash

<img border="0" src="images/logo.jpeg" alt="greenerpc" width="304" height="228">
0
 

Author Comment

by:HDM
ID: 39963057
Okay... WOW... yeah... that worked... thank you!!
0
 

Author Closing Comment

by:HDM
ID: 39963059
PERFECT!! thank you!!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question