Forums

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

Home Forums CSS CSS looks right, but img not responsive

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45558
    Bluej
    Member

    Hi there,

    I would like the header png to be responsive on this page here:
    http://dev.moerylai.com/blog/

    There’s the HTML

    And the CSS

    .pageheader img {
    width: 100%;
    height: auto;
    }

    Does anyone see what I’m missing?

    (The full style.css does validate with some warnings)

    Thanks in advance.

    #138871
    CodeGraphics
    Participant

    Go to your media query css part and add this:

    img{
    max-width:100%;
    }

    #138873
    scottnix
    Participant

    The above information won’t completely fix it.

    The answer you are really looking for involves the .pageheader CSS styling.

    Change the width: 960px; to 100%, then set a max-width: 960px; on the pageheader class. Then it will scale correctly, currently the main issue is you are using a fixed width div in a responsive site which is not going to flex.

    #138944
    Bluej
    Member

    @scotttnix and @CoodeGraphics

    Thanks! .pageheader {width: 100%;} fixed it right away.

    Really appreciate it!

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