Forums

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

Home Forums CSS let childElement decide fatherElement’s width

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #180931
    lrelia
    Participant

    http://codepen.io/lrelia/pen/Hwgzi
    hi,guys.is there any solution make the “.wrap” width the same as img without moving img?

    #181031
    Paulie_D
    Member

    It’s not clear what you are trying to do.

    Is is a requirement that the ‘wrap’ be absolutely positioned?

    Also…don’t do this

    maximum-scale=1.0, user-scalable=no

    #181032
    Paulie_D
    Member

    Here…

    http://codepen.io/Paulie-D/pen/Hznpd

    I added the padding to the image and removed the div.

    #181035
    Mikko Laine
    Participant

    or just inline-block

    #181037
    Paulie_D
    Member

    @Mikko Laine

    Well yes, of course, but I assumed the positioning was there for a reason.

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