Forums

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

Home Forums CSS Media query doesn't center Img within Div

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #168898
    oxxi
    Participant

    The media query that I have set for max-width: 1092 does not center the image that is within the div. I have set #imgWrapper to:width:100% text-align:center but the image still does not move to the center of the page.

    http://oxvac.github.io/music.html

    #168919
    Paulie_D
    Member

    You have an media query which has the image floating left which is not getting overriden.

    @media (max-width: 1183px)
    #albumPic {
    float: left;
    }
    
    #168956
    oxxi
    Participant

    Shouldn’t the media query max-width:1092px already override it? Anyways now I tried something and it works but I don’t think it supposed to. So what I did now is I put float:center and it works. But that’s not valid is it? Why does that work? Try resizing the window until you see the picture move to the center.

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