Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • When to use tag img or css background images

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 180
    Comment on it

    Proper uses of img tag

    • You can make use of IMG in case you are looking forward to enable people to print your page and the image has to be present there by default.
    • For images that have important meanings, you can go for IMG with alt text. A notice or warning icon are good examples of such images. Doing this will help communicate the meaning of the image to all user-agents, including screen readers.
    • In case you are dependent on browser scaling to render an image in proportion responsive to text size, IMG provides you the right fix.
    • You can also go for IMG if multiple overlay images are there in IE6.
    • Its a really wise idea to put IMG into use rather than background-image, as it paves the way to boost performance of animations over a background.
    When to use CSS background-image
    • If the image is not part of the content, you can use images from background.
    • Pick images from background when while performing a task of image-replacement of text.
    • Another great benefit of using images from background is improvement in download times, as with CSS sprites
    • If you are trying to make the image visible, the best way is to use images from background. Dont forget to use background-image with background-size:cover if you want to stretch a background image to fill its entire window.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: