|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
New to webdesign, cant get images to show up
04-17-2011, 02:59 PM
|
New to webdesign, cant get images to show up
|
Posts: 7
|
So I'm new to webdesign, really new.
I recently started trying to follow tutorials about it but I'm having a hard time. I'm following one of those photoshop to html/css guides and even right at the beginning already having trouble.
The guide says to insert the image that you saved and do it like so.
<img src=”images/name of image.png” alt=”name of image” />
For my image it's like this.
<img src=”images/light-box.png” alt=”light-box” />
And it never shows up, it's just a broken image. It appears like this with any image I put in.
My folder structure is like this.
Images
Index.html
style.css
I've tried other browsers and it's the same thing.
What am I doing wrong here?
This is the code from the guide. Basically this guide in this part is trying to get you to insert a logo from a sliced up psd and the logo will be a link to the home page.
<div id=”container”>
<div id=”header”>
<ul id=”nav”>
<li id=”li_home” class=”selected”></li>
<a href=”index.html”>Home</a>
<li id=”li_work”><a href=”work.
html”>Work</a></li>
<li id=”li_about”><a href=”about.
html”>About</a></li>
<li id=”li_contact”><a href=”contact.
html”>Contact</a></li>
</ul>
<div id=”slogan”>
<h1><a href=”index.html”>Light Box</a></h1>
<img src=”images/light-box.png” alt=”Light Box” />
<p>Hi, we’re LightBox, a completely
made up design agency that specializes in fresh, clean web
design and graphics. <a href=”about.html”>Find out more.
<a></p>
</div><!-- end slogan-->
</div><!-- end header-->
So what exactly is the issue, did he miss a step? This guide is from jeff way from nettuts an established designer so I cant see that he missed something simple like this.
|
|
|
|
04-17-2011, 03:23 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
Add a forward slash to the image path to make it root relative.
/images/
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
04-17-2011, 03:47 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 7
|
That does nothing either. 
|
|
|
|
04-17-2011, 04:40 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
Correct the case of the path to /Images or change the foldername to images
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
04-17-2011, 05:18 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 7
|
I don't understand what you mean by correct the case of the file path. I posted my directory of my folders and files, what is the issue of the file path?
I have a images folder containing my images, than a index and css file above it.
How do I get these images to show? I tried just about everything and nothing is working.
|
|
|
|
04-18-2011, 06:54 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 82
Name: Andrew
Location: SW Scotland
|
Quote:
Originally Posted by jesbweb
correct the case of the file path
|
Upper case / Lower case. The directory structure you listed showed your images directory is " Images" whereas the file path (the src attribute in the img tag) is to a directory called " images". As ChrisHirst said you have to rename one or the other so that they match.
|
|
|
|
04-18-2011, 01:17 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 1,584
Location: Kokkola, Finland
|
it's always better to keep everything lower case and don't have spaces in filenames (you can use names-like-this.html or names_like_this.html)
|
|
|
|
04-18-2011, 08:40 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 7
|
I'm sorry for the confusion, but I actually do have all my files and everything in lower case. My post wasn't typed out right, but that's not how I saved them. Everything is saved in lowercase, I'm aware of that being the best way of saving everything.
|
|
|
|
04-19-2011, 12:39 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 1,584
Location: Kokkola, Finland
|
ah ok 
|
|
|
|
04-19-2011, 05:52 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 82
Name: Andrew
Location: SW Scotland
|
I can think of 2 possible reasons why your page isn't linking to the image
Possibility #1
the quotes in index.html are as they appear in your post, ” instead of "
Solution: search and replace all instances of ” with "
Possibility #2
light-box.png is not in the images folder, it's been saved somewhere else instead
Solution: hmm, maybe save it in the right folder? 
|
|
|
|
04-19-2011, 07:00 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
Better still
provide a LINK so we can stop guessing at what might be wrong
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
04-19-2011, 12:47 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 7
|
Quote:
Originally Posted by Kelpie
I can think of 2 possible reasons why your page isn't linking to the image
Possibility #1
the quotes in index.html are as they appear in your post, ” instead of "
Solution: search and replace all instances of ” with "
Possibility #2
light-box.png is not in the images folder, it's been saved somewhere else instead
Solution: hmm, maybe save it in the right folder? 
|
It's not the either of the two. Everything is in lowercase. And light-box.png is in the images folder. But I tested other images in the folder and they don't show up either, it's not an issue of the image not in the right folder.
What exactly can I link you to?
This is my mark up.
HTML Code:
<div id=”container”>
<div id=”header”>
<ul id=”nav”>
<li id=”li_home” class=”selected”><a
href=”index.html”>Home</a></li>
<li id=”li_work”><a href=”work.
html”>Work</a></li>
<li id=”li_about”><a href=”about.
html”>About</a></li>
<li id=”li_contact”><a href=”contact.
html”>Contact</a></li>
</ul>
<div id=”slogan”>
<h1><a href=”index.html”>light-box</a></h1>
<img src="light-box.png" alt="light-box" />
<p>Hi, we’re LightBox, a completely
made up design agency that specializes in fresh, clean web
design and graphics. <a href=”about.html”>Find out more.
</a></p>
</div><!-- end slogan-->
</div><!-- end header-->
Here is my directory structure.
images
index
css
Last edited by chrishirst; 04-19-2011 at 02:15 PM..
|
|
|
|
04-22-2011, 04:42 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 879
Name: Paul W
|
What exactly can I link you to?
A web page on a web server.
|
|
|
|
04-22-2011, 05:49 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 1,584
Location: Kokkola, Finland
|
yes 
|
|
|
|
04-22-2011, 08:04 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
Originally Posted by PaulW
What exactly can I link you to?
A web page on a web server.
|
Just make sure it is your page on your server that shows us the problem. 
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
04-22-2011, 11:52 PM
|
Re: New to webdesign, cant get images to show up
|
Posts: 36
Name: gong
|
I think when you put link on your image you not give the value of border
Quote:
for example : <a href="example.html" alt="example">Your image.png</a> (this can cause your image broken)
you should <a href="example.html" alt="example" border="0">Your image.png</a>
|
I hope this can help
|
|
|
|
04-23-2011, 12:18 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 879
Name: Paul W
|
Quote:
Originally Posted by gongpex
I think when you put link on your image you not give the value of border
I hope this can help
|
How would adding an invalid attribute to the a href tag improve things?
|
|
|
|
04-25-2011, 08:43 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 36
Name: gong
|
when you using image as link for example:
Quote:
<a href=yourlink">YOUR image</a>
withour border="0" it can cause underline at the image,
|
but in chrome it can't cause the underline.
But in firefox and opera it can
|
|
|
|
04-25-2011, 08:46 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
How does setting border width to zero affect the underlining of image elements???
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
04-25-2011, 08:58 AM
|
Re: New to webdesign, cant get images to show up
|
Posts: 36
Name: gong
|
you can try it using firefox browser. use image in JPG or PNG
when I still study, I had ever tried to make animation using PNG or JPG image that using margin taq,
and the results can cause underline that same as text when you not use CSS style
text-decoration:none;
--------------------------------------------------------------------------
By the way, why when I post my new thread it always deleted?
please give me answer or explanation
|
|
|
|
|
« Reply to New to webdesign, cant get images to show up
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|