BuddyBoss Home – Web › Support Forums › Plugins › BuddyBoss Media › Increase space beneath the media wrapper
- This topic has 7 replies, 2 contibutors, and was last updated 9 years, 7 months ago by Alyssa.
Question
March 26, 2015 at 7:20 pm #38026@jgwolfensbergerThe media container rests right on top of my Comment/Like buttons and needs a bit of space. I’m using this code currently, but it impacts the Comment/Like button spacing on other activity items where additional space is not needed.
#buddypress div.activity-meta { margin-top: 5px; }
So I’m adjusting the activity-meta when I really should be increasing the space beneath the media wrapper.
I tried:
div.buddyboss-media-photos-wrap-container { margin-bottom: 10px !important; }
… but obviously don’t know what I’m doing!
Can you help me add a little space under the media wrapper? This would need to work for single images as well as the new group uploads (which are awesome, btw!).
James
Answers
March 26, 2015 at 8:14 pm #38033@alyssa-buddyboss
AlyssaParticipant@jgwolfensberger Unfortunately you can’t add padding to that element because it’s position is absolute so here is a hack to add margin to the bottom of the entire activity li, add this to functions.php:
function buddyboss_margin(){ ?> <script> $('li.activity:has(div.activity-content:has(div.activity-inner:has(div.buddyboss-media-photos-wrap-container)))').css('margin','0 0 10px'); </script> <? } add_action('wp_footer','buddyboss_margin');
I hope this is what you wanted.
March 26, 2015 at 8:39 pm #38036@jgwolfensbergerHi @tjchester –
I’m afraid this didn’t make a change for me.
Not sure if this helps, but when I dropped the code into DreamWeaver, DM flagged line 7, but I didn’t know how to correct it (or if it even needs corrected).
Any possible solutions?
Thanks man!
James
March 27, 2015 at 9:46 am #38056@alyssa-buddyboss
AlyssaParticipant@jgwolfensberger I didn’t see the image previously, this is what you want:
#buddypress div.activity-meta{margin:10px 0 0 0;}
March 27, 2015 at 9:51 am #38061@jgwolfensberger@tjchester, would you mind having a look at my original post… maybe this can’t be fixed, but please check my original inquiry.
Thanks TJ!
James
March 28, 2015 at 9:34 am #38113@alyssa-buddyboss
AlyssaParticipant@jgwolfensberger this is highly custom and should be beyond support but I think I just got it.
function buddyboss_margin(){ ?> <script> $('li.activity:has(div.activity-content:has(div.activity-inner:has(div.buddyboss-media-photos-wrap-container)))').each( function( ) { $(this).find( '.activity-meta' ).css( 'margin', '20px 0 0 0' ); }); </script> <? } add_action('wp_footer','buddyboss_margin');
March 28, 2015 at 10:06 am #38114@jgwolfensbergerWorks beautifully, @tjchester!
Thanks for definitely going the extra, extra mile on this one 🙂
It’s sincerely appreciated. Our site would not be what it is without BuddyBoss products and your support.
James
March 28, 2015 at 6:10 pm #38133@alyssa-buddyboss
AlyssaParticipant@jgwolfensberger it is quite the hack. This is not possible with CSS so jQuery was the only option. There may be a brief moment until this CSS is applied but at least you will have the extra margin. Enjoy!
- The question ‘Increase space beneath the media wrapper’ is closed to new replies.