• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

HTML Webpage need help!

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
Curtis Long
Asked:
Curtis Long
  • 5
  • 4
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Scott Fell, EE MVEDeveloperCommented:
Make sure you can surf to /images/logo.jpeg which is yoursite.com/images/logo.jpeg
0
 
Curtis LongAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Scott Fell, EE MVEDeveloperCommented:
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
 
Curtis LongAuthor Commented:
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
 
Scott Fell, EE MVEDeveloperCommented:
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
 
Curtis LongAuthor Commented:
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
 
Scott Fell, EE MVEDeveloperCommented:
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
 
Curtis LongAuthor Commented:
Okay... WOW... yeah... that worked... thank you!!
0
 
Curtis LongAuthor Commented:
PERFECT!! thank you!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now