Forums

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

Home Forums CSS CSS Height Container Issue

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #265443
    leighmillar
    Participant

    Hi,

    I have a rotating image slider on my homepage. The images have a width of 100%, but when they are resized the height of the container does not decrease with the image, so there is a lot of white space, particularly on smaller screen sizes. There is currently a height of 600px set, but if I remove this then the whole slider disappears.

    I’m not sure how to fix this. If someone can assist I would really appreciate it.

    The website is http://www.easyauto123.com.au

    Thanks.

    #265538
    Jemima Abu
    Participant

    Hey, I took a look at the code and I think it would help if you set the images as background images and then set the background-size to cover.
    For example, instead of using the img tag inside ‘num0 img slide’, you could just set the image as a background-image.
    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.