1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why doesn't my image

Discussion in 'Web Development & Web Hosting' started by Mitzs, Mar 15, 2008.

  1. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    My first tutorial and I am already stuck. I've been staring at it for 2 days now and just decide to break down and ask for help. I'm telling you this not very confident building at all!:oops: Now my book (CSS The Missing Manual by David Sawyer McFarland) had me put the image link in the css file. Should I also have something for it in my html file too? both files and the image are in the same folder. Do I need a " somewhere that he left out or have I miss spelled something that I just can not spot? Everything else is working.
    css file, which is saved as global.css
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  2. Mark-K

    Mark-K Bit Poster

    36
    3
    15
    Should be along the lines of:

    background-image: url("C:\Documents and Settings\mitzs\Desktop\css manual\bg.jpg");

    Or if its in the same foler like you said just use background-image: url("bg.jpg");

    Some useful CSS websites if you get stuck:
    http://www.w3schools.com/css/default.asp
    http://reference.sitepoint.com/css
     
    Certifications: CCNA, JNCIA, JNCIS, JNCIP
    WIP: JNCIE
  3. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    Hi Mark and thanks for the help. Your second one is actually how he had it in the book. When it didn't work like that I then thought that maybe he was asking for url and that is where I was sopouse to place it. However, I did try both of your ways just now and still nothing. :cry:

    What I am wonder though, is I do have kodak easy share on this lappy for my camera and when you look at the image file in my folder it say easyshare jpg. Could my kodak software be messing me up somehow? Or am I just reaching here?
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  4. Mark-K

    Mark-K Bit Poster

    36
    3
    15
    Maybe your re declaring the background of the body somewhere else in the CSS file, or in the <body> tag in the HTML, or have something covering up the whole page so you cant see the body, hard to tell without knowing more.

    If you use firefox theres a really good extension that helps with CSS problems called firebug, if you click on something it shows you where its getting its styles from an if they are being overwritten.
     
    Certifications: CCNA, JNCIA, JNCIS, JNCIP
    WIP: JNCIE
  5. wizard

    wizard Petabyte Poster

    5,763
    35
    174
    Are you running this on your own comp or on hosted webspace?

    If you are running it locally on your own comp shouldn't the c:\ be file:///c:/
     
    Certifications: SIA DS Licence
    WIP: A+ 2009
  6. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    I copy the path from the location out of properties this is how I have always done it so there are no typos, if it changed in css the book does not say it, plus my link url for the style sheet is the same way and it is working just fine so I doubt it.
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  7. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    The css file that I posted in my first post is all there. :biggrin Short and sweet.

    And my html is almost as short. I belive it is something with my image file.
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  8. wizard

    wizard Petabyte Poster

    5,763
    35
    174
    Is the background image actually called bg.jpg?
     
    Certifications: SIA DS Licence
    WIP: A+ 2009
  9. Mark-K

    Mark-K Bit Poster

    36
    3
    15
    Just tested the code given and it works fine, the only thing wrong might just be that :ohmy
     
    Certifications: CCNA, JNCIA, JNCIS, JNCIP
    WIP: JNCIE
  10. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    Yes it is.
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  11. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    well I uninstalled the kodak software and that wasn't it. So I just don't know.:blink
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  12. wizard

    wizard Petabyte Poster

    5,763
    35
    174
    try using ' instead of "
     
    Certifications: SIA DS Licence
    WIP: A+ 2009
  13. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    No that didn't work either wizard. I tried a different background with the same results, and I just tried the background color now that it took. So I'm just going to move forward in the book and hope I figure it out down the road. Thanks for the help guys.
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  14. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,871
    167
    256
    Mitz, you should avoid UNC paths like the plague in your markup, ie C:\local folder\file etc.. because when you upload this to a web server the path to the file will be different.

    Like Mark said..

    Did you put the quotes in there? "bg.jpg"
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)
  15. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    Well you and Mark did it for me! woohoo. I needed to remove the (images/) before the bg.jpg. That just was not sinking in lastnight or today! I wonder why he has that in the book if it does not work? Thanks guys, Reps to you both, and to wizard just for hanging in there with me.
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  16. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,871
    167
    256
    Because Mitzs the author has his/her images in a child folder named *images*, and you have your images in the same folder as your html pages.

    I'm glad it's sorted and thanks for the rep :)
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)
  17. wizard

    wizard Petabyte Poster

    5,763
    35
    174
    No problem 8)
     
    Certifications: SIA DS Licence
    WIP: A+ 2009
  18. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    :D Dam blue you just keep making my day! Thanks for explaining the child folder!
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  19. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,871
    167
    256
    You're most welcome 8)
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)

Share This Page

Loading...