I feel stupid for asking this :p

Discussion in 'HTML & Website Design' started by maney, Sep 1, 2006.

  1. #1
    I feel stupid asking this but I guess its got to be asked :eek:

    I've got a bunch of pages in a folder but I've got the image file in the root directory, how do I get the files in the folder to take their source from the files (images and incs) in the root? Like I say, I feel stupid for having to ask this :eek: :rolleyes:
     
    maney, Sep 1, 2006 IP
  2. sebastya

    sebastya Well-Known Member

    Messages:
    2,449
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    138
    #2
    <img src="../nameofimage">

    correct me if I am wrong.
     
    sebastya, Sep 1, 2006 IP
  3. math20

    math20 Peon

    Messages:
    1,562
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yep, just include the full url instead of just the file name, good luck with the site!
     
    math20, Sep 1, 2006 IP
  4. ketan9

    ketan9 Active Member

    Messages:
    548
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #4
    if the images are in the same folder as the file then you don't need to provide full address, all you have to do is just provide name in <img src='filename'/>
    But if its in different folder then probably the best way to do is provide the direct url for the image ...<img src='http://domain/subfolder/filename'/>
     
    ketan9, Sep 2, 2006 IP
  5. alterego85

    alterego85 Peon

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ^^ yup, what he says.

    by the way, never feel stupid to ask anything. it's what this forum is for. :)
     
    alterego85, Sep 3, 2006 IP
  6. Dabs

    Dabs Peon

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If the site design is consistent, you might want to use the relative url. I think it's because of browsers cache or something, so visitors don't suck as much bandwidth. I'm guessing this is for an image of something like a logo.

    But you can't go wrong with an absolute url.
     
    Dabs, Sep 4, 2006 IP
  7. maney

    maney Active Member

    Messages:
    1,130
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    90
    #7
    Hurrah thanks :D

    Now, lets never speak of this thread again. :eek:
     
    maney, Sep 4, 2006 IP