School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,443 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,519 people online right now. Registration is fast and FREE... Join Now!




cant get jpg to work?

 

cant get jpg to work?

3liminat3r

27 Jun, 2009 - 10:44 PM
Post #1

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

ok im having a issue with this i have actually a animated gif file i would like to put in the top left of my page. So in its failer to show in my page. I went to a jpeg pic to try to put in the same position, it shows a block with a x in it when viewing the page, now i am trying a jpg file, I also have tryed changing it from an id to a class, still nothing.. I have even just tryed to copy and paste other peoples code, can some one fix my code and explain why it isnt working...
also here is my page any suggestion would help thanks madisonbrotherhood.x10hosting.com




index.html
CODE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
    Madison Brotherhood
</title>
<link rel="stylesheet" href="theme.css" type="text/css" />
</head>
<body>
<div id="container">
<h1>
    Madison Brotherhood<br />
        Brothers And Sisters That Care
</h1>
<div class="img">
</div>
<p><center>IN THE BEGINING:</center><br />
<center>Madison brotherhood was formed to be able to line up cruise ship traveland casino trips at discount prices.<br />
<br />The first meeting was at Pope's Place in Madison, July 7,2005.The first members at this meeting was Bill Green,<br />
<br />Jackie Wilmore,Woody Woods,Jeff Moreland,Joe Jolley,Jodie Davis,Tom Whitley,Doug Skidmore,Jimmy Fox,<br />
<br />Bo Boguskie.It has grown from there to a charity organization, with people with heart to help others. <br />
<br />The first women to join in 2006 , were Janine Jolley,Brenda Moore,Bonnie Simmons,Peggy Woods.
        </p>
            </center><br />

<table style="position:absolute; z-index:9 !important; left:0px; center: 0px;" border="10">
<tr><td>Navigation</td></tr>
<tr><td><a href="index.html"> History</a> </td></tr>
<tr><td><a href="display.html"> News </a></td></tr>
<tr><td><a href="photo.html">Pictures of Events</a></td></tr>  
</table>    
    
<br/><br/><br/>
<br/><br/>    
<br/><br/><br/>
<br/><br/>
<br /><br />
<br /><br />
<br />
<div id="footer">Copyright &copy; 2009 Madison Brotherhood
<br />
</div>

<div id="tab">
   <tr><td><a href="index.html">History</a> </td></tr>
   <tr><td><a href="display.html">News</a></td></tr>
   <tr><td><a href="photo.html">Pictures of Events</a></td></tr>
</div>
</div>    

</body>
</html>
theme.css
CODE
body { background-color: #E6E6FA;
    color: #191970;
    font-family: Verdana, Arial, sans-serif;
    
}

h1 { background-color: #191970;
    color: #E6E6FA;
    line-height: 200%;
    text-align: center;
        font-family: Georgia, "Times New Roman", serif;
        
}

.nav { font-weight: bold;
    font-size: 1.25em;

}

#footer {background-color: #ccaa66;
    font-size: .75em;
    font-style: italic;
    text-align: center;
}

#container {margin-left: auto;
            margin-right: auto;
            width:80%;
}

#tab {background-color: #33CCFF;
    font-style: bangle;
    text-align: center;
)


.img{
position: relative;
left: 575px;
top: -300px;
font-family: arial, helvetica, sans-serif;
background: url(ele.jpg) no-repeat;
white-space: nowrap;
display: block;
width: 180px;
height: 50px;
margin: 0;
padding: 0;
}
    



User is offlineProfile CardPM
+Quote Post


no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 10:50 PM
Post #2

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
QUOTE(3liminat3r @ 28 Jun, 2009 - 12:44 AM) *

I went to a jpeg pic to try to put in the same position

Can you specifically point out in that code which image isn't loading? Also, can you provide the live URL?
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 10:55 PM
Post #3

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

QUOTE(no2pencil @ 27 Jun, 2009 - 10:50 PM) *

QUOTE(3liminat3r @ 28 Jun, 2009 - 12:44 AM) *

I went to a jpeg pic to try to put in the same position

Can you specifically point out in that code which image isn't loading? Also, can you provide the live URL?


the only "img" i have on the site is ele.jpg and it isnt showing at all?? Thats the problem..http://madisonbrotherhood.x10hosting.com/index.html
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 10:58 PM
Post #4

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
QUOTE(3liminat3r @ 28 Jun, 2009 - 12:55 AM) *

background: url(ele.jpg) no-repeat;
....
the only "img" i have on the site is ele.jpg and it isnt showing at all??



http://madisonbrotherhood.x10hosting.com/ele.jpg <-- 404
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:01 PM
Post #5

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

what does that mean??
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:04 PM
Post #6

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
Can you provide a link to the where the image is located? Your css file points to the file with no sub directories, so it's looking in the root directory (which is the link I provided), & that file can't be found.
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:07 PM
Post #7

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

/public_html/images would this be it???
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:11 PM
Post #8

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
he mean did you upload your site?
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:13 PM
Post #9

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

yes i uploaded it to x10hosting.com i provided the link for that... I uploaded the images there as well!!
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:15 PM
Post #10

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
QUOTE(3liminat3r @ 28 Jun, 2009 - 01:13 AM) *

yes i uploaded it to x10hosting.com i provided the link for that... I uploaded the images there as well!!


http://madisonbrotherhood.x10hosting.com/p.../images/ele.jpg

Your css needs to point to the relative path. We have not yet determined what that is. Can you show us where it is?


I found it...

http://madisonbrotherhood.x10hosting.com/images/ele.JPG

Assuming that this is a Linux/Unix file system, you need to match the case in your code.

CODE

background: url('images/ele.JPG') no-repeat;

User is online!Profile CardPM
+Quote Post

noorahmad

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:16 PM
Post #11

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
it is a Link not a text
madisonbrotherhood.x10hosting.com
always use url tages

This post has been edited by noorahmad: 27 Jun, 2009 - 11:17 PM
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:20 PM
Post #12

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

im totally lost

This post has been edited by 3liminat3r: 28 Jun, 2009 - 12:16 AM
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:25 PM
Post #13

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
I don't think we can view that page unless we are logged in. Did you check my previous post?
User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:35 PM
Post #14

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

just seen it sorry still nothing though when i change the code

CODE
.img{
position: relative;
left: 575px;
top: -300px;
font-family: arial, helvetica, sans-serif;
background: url('images/ele.JPG) no-repeat;
white-space: nowrap;
display: block;
width: 180px;
height: 50px;
margin: 0;
padding: 0;
}


also to noorahmad, if you look at like the 3rd post i did use a url tag.. Sorry i didnt do it in the 1st post but i didnt know the code for it, im a noob, give me a little break!
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:40 PM
Post #15

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,233



Thanked: 289 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
You missed the ending quote ...

CODE

background: url('images/ele.JPG') no-repeat;

User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

27 Jun, 2009 - 11:52 PM
Post #16

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

ahhh im really tired i missed that i've been working on this for hours.. still nothing when i changed it, think maybe it is in the index.html where it is going wrong??

CODE
.img{
position: relative;
left: 575px;
top: -300px;
font-family: arial, helvetica, sans-serif;
background: url('images/ele.JPG') no-repeat;
white-space: nowrap;
display: block;
width: 180px;
height: 50px;
margin: 0;
padding: 0;
}

User is offlineProfile CardPM
+Quote Post

noorahmad

RE: Cant Get Jpg To Work?

28 Jun, 2009 - 12:03 AM
Post #17

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
you have error in your CSS you didn't closed your CSS
HTML
body { background-color: #E6E6FA;
color: #191970;
font-family: Verdana, Arial, sans-serif;

}

h1 { background-color: #191970;
color: #E6E6FA;
line-height: 200%;
text-align: center;
font-family: Georgia, "Times New Roman", serif;

}

.nav { font-weight: bold;
font-size: 1.25em;

}

#footer {background-color: #ccaa66;
font-size: .75em;
font-style: italic;
text-align: center;
}

#container {margin-left: auto;
margin-right: auto;
width:80%;
}

#tab {background-color: #33CCFF;
font-style: bangle;
text-align: center;
} // Here Was Your Problem Check Your Page
.img
{
position: relative;
left: 575px;
top: -300px;
font-family: arial, helvetica, sans-serif;
background: url(ele.jpg) no-repeat;
white-space: nowrap;
display: block;
width: 180px;
height: 50px;
margin: 0;
padding: 0;
}

User is online!Profile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

28 Jun, 2009 - 12:12 AM
Post #18

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

thanks for your help im ganna to call it a night still nothing after i changed the closing bracket.. need to give my eyes a break maybe i can spot whatever i did tomarrow and try to fix it here is my code after i changed it!
CODE
body { background-color: #E6E6FA;
    color: #191970;
    font-family: Verdana, Arial, sans-serif;
    
}

h1 { background-color: #191970;
    color: #E6E6FA;
    line-height: 200%;
    text-align: center;
        font-family: Georgia, "Times New Roman", serif;
        
}

.nav { font-weight: bold;
    font-size: 1.25em;

}

#footer {background-color: #ccaa66;
    font-size: .75em;
    font-style: italic;
    text-align: center;
}

#container {margin-left: auto;
            margin-right: auto;
            width:80%;
}

#tab {background-color: #33CCFF;
    font-style: bangle;
    text-align: center;
}


.img{
position: relative;
left: 575px;
top: -300px;
font-family: arial, helvetica, sans-serif;
background: url('images/ele.JPG') no-repeat;
white-space: nowrap;
display: block;
width: 180px;
height: 50px;
margin: 0;
padding: 0;
}
    


User is offlineProfile CardPM
+Quote Post

3liminat3r

RE: Cant Get Jpg To Work?

28 Jun, 2009 - 10:49 AM
Post #19

D.I.C Head
**

Joined: 22 May, 2009
Posts: 50

ok im back and ready still after all these changes, the page still does not work!
User is offlineProfile CardPM
+Quote Post

RudiVisser

RE: Cant Get Jpg To Work?

29 Jun, 2009 - 12:54 AM
Post #20

.. does not guess solutions
Group Icon

Joined: 5 Jun, 2009
Posts: 1,872



Thanked: 137 times
Dream Kudos: 125
Expert In: PHP, MySQL, HTML, CSS, C#

My Contributions
I'm curious, why arn't you just using
CODE
<img src="/images/ele.JPG" alt="Elephants!" />


Most of that code in your CSS is absolutely irrelevant..

display: block; - Div's are block-level.
margin: 0; padding: 0; - Div's have no padding/margin on them anyway.
font-family: arial, helvetica, sans-serif; - You're not displaying text, why does it need a font?
left: 575px; top: -300px; Sure this is doing something?
white-space: nowrap; Again, no text, no point
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:28AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month