Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  permalink
    whats the better way to put images, declare de parameters in the css like width, height ... and in the html put something like this <a href="www.mysite.com?phpMyAdmin=4594f30712f4fabaff6997416810f3f2" title="bla bla "><img src="image.jpg" width="222" height="289" alt="bla bla"/></a> OR!!!! put with the parameters of css with a background: url(image.jpg);

    WHATS THE DIFFRENCE??? i see a adventaje in the html for put title to image but????????? please help me! thanks
    • CommentAuthorMouldy
    • CommentTimeFeb 16th 2006 edited
     permalink
    If you put images in the background it saves a little bit of markup in the html. If you want the same image in several places this can be handy. You can, of course, have background images with text on the top, the original intention of the property, I think.

    If you put images in the foreground, you can add a link so you can click on them; you can add inline style, for example add ems after the pixel width and height so the image will resize if you change the basic font-size of the page; you can also position an image of a heading over its text for simple headings. I have an article on my site about this
  2.  permalink
    If it's for your site design or style, you use background images, always.

    If it's for content (ie, your picture on the "about page"), you use image tags and embedded images.
    • CommentAuthorakito85
    • CommentTimeFeb 17th 2006
     permalink
    you have to use CSS cuz CSS make everything easier...

    e.g. background: transparent url(image.jpg) repeat-y top left;
    •  
      CommentAuthortsk
    • CommentTimeFeb 17th 2006 edited
     permalink
    i think you're better off with what nick said. It makes sense too.
    All your design orientend images should be accessible via your CSS and the ones related to content should be inside your markup.

    There's no sense in crowding your css file with classes or ids meant for content images.

    Take it this way: your design and layout should be flexible using your css file to alter certain elements (background images for example), yet your content images are likely to remain the same (a newsphoto for example). - No point in storing those in your css file.

    Also "alt" makes for eficient SEO in some search engines, which, in terms, means you must have your content images in your markup rather than your css in order to use that atribute.
    • CommentAuthorrwebler
    • CommentTimeFeb 17th 2006
     permalink
    nick1presta and tsk have got it right, IMO. Semantics seems to be the issue. A good rule of thumb is to disable css on the page. If the information is crippled because some image is gone, it belongs in the markup. If there are images unrelated to the content, they belong in the css.
Add your comments
    Username Password
  • Format comments as (Help)