Results 1 to 3 of 3

Thread: Changing url

  1. #1
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Changing url

    Hello,
    I am new at this and my first efforts are not working as I am not referencing the to the image properly,
    If for example, I want to use the image background watermark and it say to change the graphi, how do I referance it?
    If the image was in my folder and say was flowers.jpj .could someone please write this code as in the example below? I do not know if I take out the brackets, qoutation marks.. nothing is working. , if I have to add the file path how do I do that?
    Thank you


    .body.style.background="url('notebook.jpg') white center no-repeat fixed"

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Plain syntax for image in the same folder as the page:

    Code:
    document.body.style.background="url('flowers.jpg') white center no-repeat fixed"
    With a relative path (image is one level off of the page's in a folder called 'images'):

    Code:
    document.body.style.background="url('images/flowers.jpg') white center no-repeat fixed"
    With absolute path (image is one level off of the root of the domain in a folder called 'images'):

    Code:
    document.body.style.background="url('http://www.mydomain.com/images/flowers.jpg') white center no-repeat fixed"
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you!
    I have flowers......

Bookmarks

Posting Permissions

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