Forums

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

Home Forums CSS [Solved] make the parent DIV's height/width determined by 2 flt:left child DIVs

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #209836
    ThomasAJ
    Participant

    When the 2 child DIVs are horizontally next to each other the parent DIV’s height and width are totally determined by the children.

    But if the children are stacked vertically the parent DIV’s width remains as it was just before the children stacked. (the height is fine.)

    (I have tried all sorts of things that only made it worse than what I have below.)

    See codepen http://codepen.io/anon/pen/dYZZaj

    Narrow the browser and you will see what I mean.

    Thanks

    #209841
    ThomasAJ
    Participant

    Thanks Paulie_D

    “Cannot be done” seems to be correct as far as my searching has made me conclude.

    #209844
    ThomasAJ
    Participant

    Thank you Paulie_D but not sure if you are pointing to it as a solution or as a ‘cannot be done’ .

    If you (or anyone else) can make my code in codepen perform parent width = largest child width (ignore borders, margins etc) when children are stacked vertically then I’ll pay you US$100 via PayPal. Seriously!

    Only needs to work in modern browsers. (I’ll be happy with IE9+)
    If you have workarounds for older then I’ll pay extra.

    Please PM me. (oops not sure if PM is available at css-tricks)
    Thanks Tom

    #209848
    ThomasAJ
    Participant

    Thanks Shikkediel

    I will look into it tomorrow as I am going to dinner now.

    If it works the $s are yours.

    PS: Pls put your code into codepen or JSF – based on my child sizes. Thanks.

    #209857
    ThomasAJ
    Participant

    Hi Shikkediel

    Your solution at http://jsfiddle.net/cfL491Lc/ is PERFECT for MY NEEDS. I cannot thank you enough.

    1. I have upvoted at SO but not sure which answer at css-tricks should be “Marked as good”.
    2. What is the importance for you at SO regarding a high rep score?
    3. Do you freelance? I do some html/css as I have a developer background (long story) but now run a business and have no time for such. If you are interested and have the skill set I am after maybe we can do business but how do we contact each other without making our emails public?
    #210252
    Shikkediel
    Participant

    Hmm… a hundred big ones versus an upvote. That’s ten a reputation point. Not that I don’t care at all about it there (or I’d jump on the quick fixes a lot more which seems to be a regular trend ) but I wouldn’t spend that if I could. Four bucks a pop, the equivalent of an additional accepted answer, sounded a bit better.

    :-p

    Actually, I think I upvoted the question so I’m sort of giving $50 away as well. Lol.

    #210254
    ThomasAJ
    Participant

    Hi Shikkediel

    Unfortunately you may have possibly assumed? or not…

    1. I am totally conversant with the nuances of SO kudos.
    2. That I understand your last post – sorry I do not – just a little bit too obtuse for me.
    3. That I may not have paid you the USD $100.

    Anyway, bottom line, what do you want me to do?

    PS of course you post may not have anything to do with me…see point 2.

    Thanks for your help
    Tom

    #210257
    Shikkediel
    Participant

    Sorry, I’m not always posting serious stuff. But if you’d be willing to click on the greyed out check mark next to the answer that would be great.

    :-)

    #234745
    Shikkediel
    Participant

    Lol, don’t know if it’s a mistake or a statement… accepting instead the “answer” that starts with I’m not getting your question and then jams a </br> tag in there to “solve” the issue. Whatever.

    #234750
    ThomasAJ
    Participant

    My mistake – now corrected. Pls check.

    #234751
    Shikkediel
    Participant

    Cheers, thanks. I think I’ll be mostly avoiding that forum a bit for a while though. This small mishap was one in a line of minor incidents which are raising my level of sardonicism and are kinda taking the fun out of coding. And spending too much time there is sort of starting to stunt my “growth” as well. Don’t want that to happen, although the aforementioned is all totally irrelevant to the neutral reader and this topic.

    I do appreciate the quick follow up.

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