Results 1 to 3 of 3

Thread: Problems with adding alt description to images.

  1. #1
    Join Date
    Jul 2012
    Vantaa, Finland

    Problems with adding alt description to images.

    At the moment I have 3 sizes of the same image. 1 size for different sized screens. These images are loaded from a css file. The code is;

    #head-photo {
        width: 100%;
        background-image: url('http://what-do-christians-believe.co.uk/wpimages/people_2d.png');
    I am trying to put the image into an html file so that I can add an alt tag to it. I thought that the easiest way to do this would be to make the image responsive. I am using the following css code for this'

    #head-photo {
         max-width: 100%;
         Height: 85px;
    The problem is that it isn't resizing the image. It is just using a chunk of it. I have attached a file for you to see. the problem.

    You might want to look at this image on my site to see what it should look like.

    How do I make the image responsive or at least show the bottom half of the picture?
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2012
    To make the image responsive, do NOT set the height. Just set the width, and the browser will scale the image as appropriate. If you want to limit the maximum height, set a max-width in the CSS! Yes, really.
    Last edited by jedaisoul; 04-01-2013 at 01:40 PM.

  3. #3
    Join Date
    May 2005
    Gold Coast (MS)
    Since you are using a strict document type, you may want to correct the HTML errors. One for CSS.


    Why Validate?: http://validator.w3.org/docs/why.html
    CSS Validator: http://jigsaw.w3.org/css-validator/
    HTML Validator: http://validator.w3.org/#validate_by_uri+with_options
    Unicorn - W3C's Unified Validator: http://validator.w3.org/unicorn/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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