The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Resizing images in CSS for responsive devices

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #205444

    I am trying to make my website compatible for various devices. The problem is that I have images that are too big for certain screen sizes. I can’t seem to figure out how to resize the images automatically for when it is on a smaller screen. I am having the same issue with text as well. I also can’t seem to get a border to work around images. Any help would be incredibly appreciated.


    Gary Pickles

    Hi Har91,

    If you use the class on the image to set the size and remove the sizing in your html.

    <img src="images/alcatraz.png" alt="Alcatraz" />

    then add this style to .medium
    width: 100%;
    max-width: 600px;
    height: auto;

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.