Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    63
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Image won't display...

    I'm modifying a template created in xhtml1-strict.dtd. I need to add an image and I coded it thusly: <img src="applelogo.gif" width="100" height="40" alt="Apple logo" />. The .gif is in the correct directory. From all I've read that should work but it's not. Knowing me I'm probably missing something obvious.

    Thanks.

    mccc

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    File names are case sensitive. Thats about as much help as we can give as you haven't posted a url to the site.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    63
    Thanks
    2
    Thanked 0 Times in 0 Posts
    All the files are in lowercase. One thing I just noticed; the image coding is within DIV tags. Would that effect it?

    I'm still in the early stages and I haven't uploaded the page yet. I'll try to do that tomorrow.

    Thanks.

    mccd

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Post the rest of your html. Perhaps you just have coding errors in it causing the image not to show up.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    Dec 2005
    Posts
    63
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Here are the HTML & the stylesheet:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Praise Travel and Transportation</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="default.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="header">
    	<h1>Praise Travel and Transportation</h1>
    	<h2></h2>
    </div>
    <!-- end #header -->
    <div id="menu">
    	<ul>
    		<li class="first"><a href="#" accesskey="1" title="">About Us</a></li>
    		<li><a href="#" accesskey="2" title="">Our Services</a></li>
    		<li><a href="#" accesskey="3" title="">Our Products</a></li>
    		<li><a href="#" accesskey="4" title="">Customer Support</a></li>
    		<li><a href="#" accesskey="5" title="">Contact Us</a></li>
    	</ul>
    </div>
    <!-- end #menu -->
    <div id="content">
    	<div id="posts">
    		<div class="post">
    			<h2 class="title">We are Your Vacation & Travel Resource</h2>
    			<div class="story">
    				<p><strong>Whether</strong> it's a Western Carribean cruise, a vacation at an exclusive Cancun/ Riviera Maya resort or a weekend excursion to New York, <em><strong>Praise Travel and Transportation</strong></em> is here to handle all your travel needs. </p>
    			</div>
    		</div>
    		<div class="post">
    			<h2 class="title">Associated with</h2> <img src="applelogo.gif" width="100" height="40" alt="Apple logo" />			<div class="story">
    				<p><strong>This</strong> is an example of a paragraph followed by a blockquote. In posuere eleifend odio. Quisque semper augue mattis wisi. Maecenas ligula. Pellentesque viverra vulputate enim. Aliquam erat volutpat lorem ipsum dolorem.</p>
    				<blockquote>
    					<p>Pellentesque tristique ante ut risus. Quisque dictum. Integer nisl risus, sagittis convallis, rutrum id, elementum congue, nibh. Suspendisse dictum porta lectus. Donec placerat odio</p>
    				</blockquote>
    				<h3>Heading Level Three</h3>
    				<p>An unordered list example:</p>
    				<ul>
    					<li>List item number one</li>
    					<li>List item number two</li>
    					<li>List item number three </li>
    				</ul>
    				<p>An ordered list example:</p>
    				<ol>
    					<li>List item number one</li>
    					<li>List item number two</li>
    					<li>List item number three</li>
    				</ol>
    			</div>
    		</div>
    	</div>
    	<!-- end #posts -->
    	<div id="links">
    		<ul>
    			<li>
    				<h2>News &amp; Updates</h2>
    				<ul>
    					<li><a href="#">February 2007</a> <i>(22)</i></li>
    					<li><a href="#">January 2007</a> <i>(31)</i></li>
    					<li><a href="#">December 2006</a> <i>(31)</i></li>
    					<li><a href="#">November 2006</a> <i>(30)</i></li>
    					<li><a href="#">October 2006</a> <i>(31)</i></li>
    				</ul>
    			</li>
    			<li>
    				<h2>Lorem Ipsum Dolor</h2>
    				<ul>
    					<li><a href="#">Donec Dictum Metus</a></li>
    					<li><a href="#">Etiam Rhoncus Volutpat</a></li>
    					<li><a href="#">Integer Gravida Nibh</a></li>
    					<li><a href="#">Maecenas Luctus Lectus</a></li>
    					<li><a href="#">Mauris Vulputate Dolor Nibh</a></li>
    					<li><a href="#">Nulla Luctus Eleifend</a></li>
    					<li><a href="#">Posuere Augue Sit Nisl</a></li>
    				</ul>
    			</li>
    		</ul>
    	</div>
    	<!-- end #links -->
    	<div style="clear: both;">&nbsp;</div>
    </div>
    <!-- end #content -->
    <div id="footer">
    	<p id="legal">Copyright &copy; 2007 Praise Travel and Transportation. Designed by mccd</p>
    </div>
    <!-- end #footer -->
    </body>
    </html>
    Code:
    body {
    	margin: 0;
    	padding: 0;
    	background: #FFFFFF url(images/img01.jpg) repeat-x;
    	font: normal 12px Verdana, Tahoma, Arial, Helvetica, sans-serif;
    	color: #666666;
    }
    
    h1, h2, h3 {
    	margin: 0;
    	padding: 0;
    	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    	color: #3E44BC;
    }
    
    h2 {
    	text-transform: uppercase;
    	font-size: 18px;
    }
    
    h3 {
    	text-transform: uppercase;
    	letter-spacing: 2px;
    	font-size: 11px;
    }
    
    p, blockquote, ul, ol {
    	line-height: 18px;
    	text-align: justify;
    }
    
    blockquote {
    	padding-left: 20px;
    	background: url(images/img05.gif) repeat-y;
    }
    
    a {
    	color: #3E44BC;
    }
    
    a:hover {
    	text-decoration: none;
    }
    
    /* Header */
    
    #header {
    	width: 760px;
    	height: 180px;
    	margin: 0 auto;
    	background: url(images/title_bg.jpg);
    }
    
    #header h1, #header h2 {
    	text-transform: lowercase;
    	font-weight: normal;
    	color: #FFFFFF;
    }
    
    #header h1 {
    	float: left;
    	padding: 120px 0 0 20px;
    	font-size: 36px;
    }
    
    #header h2 {
    	float: right;
    	padding: 134px 20px 0 0;
    	font-size: 22px;
    }
    
    /* Menu */
    
    #menu {
    	width: 760px;
    	height: 50px;
    	margin: 0 auto;
    }
    
    #menu ul {
    	margin: 0;
    	padding: 0;
    	list-style: none;
    }
    
    #menu li {
    	display: inline;
    }
    
    #menu a {
    	display: block;
    	float: left;
    	padding: 17px 20px 0 20px;
    	background: url(images/img03.gif) no-repeat;
    	text-transform: uppercase;
    	text-decoration: none;
    	font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif;
    	color: #D8D8D8;
    }
    
    #menu a:hover {
    	color: #FFFFFF;
    }
    
    #menu .first a {
    	background: none;
    }
    
    /* Content */
    
    #content {
    	width: 720px;
    	margin: 0 auto 20px auto;
    	padding: 20px;
    	background: #FFFFFF url(images/img04.jpg) repeat-x left bottom;
    }
    
    /* Posts */
    
    #posts {
    	float: left;
    	width: 480px;
    }
    
    /* Links */
    
    #links {
    	float: right;
    	width: 200px;
    	padding-left: 20px;
    	background: url(images/img05.gif) repeat-y;
    }
    
    #links ul {
    	margin: 0;
    	padding: 0;
    	list-style: none;
    }
    
    #links li ul {
    	padding: 5px 0 30px 0;
    }
    
    #links li li {
    	padding: 7px 10px;
    	background: url(images/img06.gif) repeat-x left bottom;
    }
    
    #links li a {
    	text-decoration: none;
    }
    
    #links li a:hover {
    	text-decoration: underline;
    }
    
    #links li i {
    	font-style: normal;
    	font-size: 9px;
    }
    
    #links li h2 {
    	font-size: 14px;
    }
    
    /* Footer */
    
    #footer {
    	height: 100px;
    	padding: 20px;
    	background: #2D2D2D url(images/img07.gif) repeat-x;
    }
    
    #footer p {
    	text-align: center;
    	color: #999999;
    }
    mccd

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I still think the image path is incorrect. Your code is fine.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    Regular Coder
    Join Date
    Feb 2007
    Location
    Seattle
    Posts
    153
    Thanks
    5
    Thanked 9 Times in 9 Posts
    Try inserting an absolute path to your image, e.g.: http://www.mysite.com/images/applelogo.gif

    or whatever your url is, instead of just the filename.

  • #8
    New Coder
    Join Date
    Dec 2005
    Posts
    63
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I had been working with the files on my h/d and the image was in the same directory as index.html. Once I uploaded everything the .gif displayed.

    Thank you all very much for your assistance.

    mccd


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •