Forums

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

Home Forums CSS center img horizontally

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27728
    supermankd
    Member

    I need to center my images in this slideshow but I don’t want to rely on knowing the image size. I have tried the

    Code:
    display: block;
    margin-left: auto;
    margin-right: auto

    method but it isn’t working for some reason. I’m either missing something silly or the slideshow is causing a problem. Thanks in advance for the help.

    Relevant HTML:

    Code:













    Relevant CSS:

    Code:
    /*Slideshow*/

    .slideshow {
    height: 370px;
    width: 370px;
    text-align: center;

    }

    img.cernterpic{
    display: block;
    margin-left: auto;
    margin-right: auto
    }

    link to page:
    http://kyam.ca/#2
    Link to stylesheet:
    http://kyam.ca/stylesheets/coda-slider-2.0.css

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