MyBB Community Forums

Full Version: Post bit Issues.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys I have been designing my theme and I have a few problems and I cannot find a viable solution for it. 


https://gyazo.com/d0cbf40d5f2b946ed6e2c8aa0a2d49d6

How my post bit looks like. What I want is the author card on the left hand side to have the same height as the post content. Is that possible?
You're going to need a script for that, to calculate and implement equal height on the divs.
(2016-08-15, 07:24 PM)Ashley1 Wrote: [ -> ]You're going to need a script for that, to calculate and implement equal height on the divs.

^ or make the content div a fixed pixel height, and the author details div the same fixed height. However he could have to set a character limit so the content height cannot be exceeded dynamically (because of the div having to expand to house all the text).

but i agree, a php script to calculate the height of the divs, then assign that to the author details class.
Wow didn't expect this. I'm no good at PHP anyone willing to help me out?
(2016-08-15, 08:03 PM)Freakout14 Wrote: [ -> ]Wow didn't expect this. I'm no good at PHP anyone willing to help me out?

It's beyond the scope of general support, unless someone has something ready made they are willing to share. I have seen this type of script on another CMS.
PHP wouldn't be able to help here.
Try either JavaScript or CSS.

I am not entirely sure if it will work, but you can try setting the height of the container to 100% p'haps - this might force it to inherit the height of the post, and fit to that.
However, as myself and Matt both agree, CSS Flex would be the cleanest and possibly best solution for this.
<script>
<!--
$(window).load(function() {
var maxHeight = 0;
$(".equal-height").each(function() {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
$(".equal-height").height(maxHeight);
});
//-->
</script>