Tagged: x
-
AuthorPosts
-
June 26, 2016 at 12:05 pm #1060220
armintzParticipantHello, I’m trying to vertically center the content (which is the revslider) of a single column in a 2-column row.
I’ve tried adding a class (“v-align”) to this column and the following css to the customizer:
/* VERTICAL ALIGN MIDDLE */ .v-align { float: none; margin-right: 3.5%; display: inline-block; vertical-align: middle; }It doesn’t seem to work – any idea why? My site is password protected and i’ll send a private reply with credentials.
Thank you
June 26, 2016 at 12:07 pm #1060221
armintzParticipantThis reply has been marked as private.June 26, 2016 at 12:45 pm #1060251
ThaiModeratorHey There,
Please try with this CSS instead:
.v-align { white-space: nowrap; height: 480px; overflow: hidden; } .v-align:before { display: inline-block; height: 100%; vertical-align: middle; content: ''; } .v-align > div { vertical-align: middle; height: 100%; margin-top: 0; display: inline-block; }Hope it helps 🙂
June 26, 2016 at 1:24 pm #1060275
armintzParticipantlooks great on desktop but creates huge margins on mobile version – see screenshot.
June 26, 2016 at 6:08 pm #1060490
RadModeratorHi there,
Please wrap your CSS with @media like this,
@media ( min-width: 768px ) { .v-align { white-space: nowrap; height: 480px; overflow: hidden; } .v-align:before { display: inline-block; height: 100%; vertical-align: middle; content: ''; } .v-align > div { vertical-align: middle; height: 100%; margin-top: 0; display: inline-block; } }Hope this helps.
June 27, 2016 at 12:37 pm #1061882
armintzParticipantperfect, thank you
June 27, 2016 at 2:15 pm #1062010
DarshanaModeratorGlad we were able to help 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1060220 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
