SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Belgium
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the best way to use images

    hi

    take a look at this page : http://www.vizitonline.be/html/workshop.htm (it's a tablepage),

    yesterday we changed this page to a tableless page which you can find here: http://www.vizitonline.be/html/workshop_markup.htm ,

    only one thing left to do: put the pictures in that page, what's the best method? should the pictures be in there as bground (no repeat)? Or should I just link them in the html-code?

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the images are purely decorative, you should put them in using the CSS background-image property - the benefits of doing so include the ability to quickly change them by only editing your CSS file, and also they will load last, so your page can render without waiting to download all the images.

    However, if the images are important to the message of the page, use the <img> tag and stick them in the code as normal.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Belgium
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, the images are important to the message so i will include them as img

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure you understood me, and looking at your link I would have said that the images are not important to the message.

    By that, I meant if you had a page that said: "Here's a photo of my brother bungee jumping", you would have an <img> element, with alt and longdesc attributes.

    Your images, on the other hand, are just illustrative of the sections they relate to - the overall message of the page would be the same if they weren't there, they just augment it - so I would say put them in the CSS.

    Hope that helps.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Belgium
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, gotcha!

  6. #6
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Just to summarise.

    Layout images - mostly backgrounds

    Content images - all inline


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
  •