Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Lily Romano
    @Lilyheart
    sweet
    Eric Phy
    @SimplyPhy
    Anybody have any thoughts as to why this flexbox is moving down? this
    Lily Romano
    @Lilyheart
    Not without seeing the code
    JBC944
    @JBC944
    Screenshot_4.png
    Screenshot_5.png
    I cant seem to get an image in the div
    That’s basically the issue
    JBC944
    @JBC944
    I am confused
    Eric Phy
    @SimplyPhy
    @JBC944 you didn’t close your div
    <div class=“traycontainer “ <img …></div>
    JBC944
    @JBC944
    i see it now sorry not my day today
    is there a way i could stretch the image to fit the div?
    Eric Phy
    @SimplyPhy
    no worries; any idea why mine won’t render properly :D
    css: .myImg { width: 100%; }
    JBC944
    @JBC944
    i not sure since this is my first time ever working with html
    and i dont know any other code at the moment
    i tried the 100% it takes up the whole page
    Eric Phy
    @SimplyPhy
    i updated my codepen to make the issue even more obvious
    you need to resize the div then
    100% makes it fill it’s parent container, in this case the div. the div’s parent, in your case, is the body element, which is about 100% of the window, in your case
    div’s are block elements, which automatically are 100% width, if you don’t adjust it manually
    JBC944
    @JBC944
    i got the div width set to 70%
    Eric Phy
    @SimplyPhy
    this is in contrast to inline elements, which take up the width of their content
    JBC944
    @JBC944
    height 15%
    Eric Phy
    @SimplyPhy
    okay?
    JBC944
    @JBC944
    what should i change it to
    Eric Phy
    @SimplyPhy
    no idea, prob a code issue
    show code
    JBC944
    @JBC944
    Screenshot_2.png
    Eric Phy
    @SimplyPhy
    and you’re saying the image is 100% the window?
    prob need all the code, not just your traycontainer styles
    JBC944
    @JBC944
    let me take another picture
    Eric Phy
    @SimplyPhy
    just copy/paste into this window, but wrap all of it inside “```”s
    JBC944
    @JBC944
    Screenshot_3.png
    the image is too big
    Eric Phy
    @SimplyPhy

    ``` [like this]

    code code code code code code yay

    ``` [done]

    thats all of the code i have
    Eric Phy
    @SimplyPhy
    the div it’s inside of is 70% width of the page
    JBC944
    @JBC944
    so what should i do?
    Eric Phy
    @SimplyPhy
    so when the image is 100%, it expands to fill that div (it’s parent/container), and the height will automatically be set basics on the image’s aspect ratio
    in other words: either resize your div, or resize the image
    by the way, since you’re so concerned: i sort of figured out my issue :P
    vertical-align needs to be overridden from baseline, apparently
    JBC944
    @JBC944
    sorry eric
    Eric Phy
    @SimplyPhy
    ha no worries, i just began doing all this full time 4 months ago
    believe me i’ve asked a million questions
    we all feel stupid, don’t worry
    JBC944
    @JBC944
    its hard to focus my brain atm my headache has not gone away and it started yesterday morning