simple image script question

Discussion in 'Scripts' started by rooster, Apr 19, 2012.

to remove all ads.
  1. rooster

    rooster New Member

    hey all
    i have a quick simple question. is it okay in an image tag to mix pixels with percents?

    example being = <img src="pic.jpg" height="125" width="20%">
    or is that a bad idea?

    i want the images to be a certain width across the screen, so they adjust to any screen resolution.

    I would like to do the height a percentage so that re-sizes to any screen resolution too, but if i have say 4 going across and 10 tall, i dont want to have each image height 10% and if i add more, i dont want to have to adjust that.

    does that make sense?
  2. Edge

    Edge Member

    You can do but use CSS. This will also give you more control, as you can set maximum widths, minimum widths and you won't have to put height="125" width="20%" on each image.
  3. ronaldroe

    ronaldroe Super Moderator Staff Member

    It isn't generally recommended, but if it works for your situation,there's nothing stopping you from doing it.

Share This Page