- This topic is empty.
October 17, 2015 at 5:46 pm #209836
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.
ThanksOctober 18, 2015 at 1:18 am #209841
“Cannot be done” seems to be correct as far as my searching has made me conclude.October 18, 2015 at 3:07 am #209844
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 TomOctober 18, 2015 at 3:55 am #209848
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.October 18, 2015 at 11:02 pm #209857
Your solution at http://jsfiddle.net/cfL491Lc/ is PERFECT for MY NEEDS. I cannot thank you enough.
October 27, 2015 at 6:22 pm #210252
- I have upvoted at SO but not sure which answer at css-tricks should be “Marked as good”.
- What is the importance for you at SO regarding a high rep score?
- 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?
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.
Actually, I think I upvoted the question so I’m sort of giving $50 away as well. Lol.October 27, 2015 at 6:59 pm #210254
Unfortunately you may have possibly assumed? or not…
- I am totally conversant with the nuances of SO kudos.
- That I understand your last post – sorry I do not – just a little bit too obtuse for me.
- 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
TomOctober 28, 2015 at 1:37 am #210257
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.
:-)November 9, 2015 at 2:57 pm #234745
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.November 9, 2015 at 5:29 pm #234750
My mistake – now corrected. Pls check.November 9, 2015 at 5:39 pm #234751
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.
- The forum ‘CSS’ is closed to new topics and replies.