I want to center splitter horizontally or vertically.
I'm able to do it using flex but now splitter is locked!
https://ele.io/ggirou/wicked-greenbean
<div horizontal layout>
<div flex>left</div>
<core-splitter direction="left"></core-splitter>
<div flex>right</div>
</div>
Any ideas?
Related
I have a css issue.
I have two "columns" where each column contains dynamic content + images at the bottom of each column.
I want these blocks of images to be in the bottom of each column. I could use position:absolute and set a height of each column but I'm looking for a way to achieve this without using a specified height on the columns.
The html is something like
<div class="wrapper">
<div class="content">
{text content / dynamic }
<div class="grid"> <!-- image blocks -->
</div>
</div>
<div class="content">
{text content / dynamic }
<div class="grid"> <!-- image blocks -->
</div>
</div>
</div>
If i understand you truely, you want to align-bottom of container's both right and left side. You can do use display:flex, give a
<div class="wrapper" style="display:flex; width:100%; height:auto; justify-
content:flex-start; align-items:center; "></>
Write your other styling codes, align-items helps you to your content containers align center vertically.
I'm trying to align UIKit's (3.0.0) spinner to the center of the page. But it won't.
I have tried applying align to it directly and wrapping it in container like this but nothing works:
<div class="uk-inline uk-margin">
<div class="uk-position-center">
<div uk-spinner></div>
</div>
</div>
Any ideas?
https://getuikit.com/docs/spinner
Please try this only.
<div class="uk-position-center">
<div uk-spinner></div>
</div>
I'm working on a really simple Html/Bootstrap website.
I'm using owl-carousel library to display and slide multiple paragraphs.
The problem is that when displaying on small devices, these paragraphs will not have the same height, depending on how long they are.
I would like all my owl-item div or paragraph to be aligned vertically within the owl-wrapper div. I tried few display combinations, and also the owl carousel's autoHeight: true option but it does not work as I except.
See the pictures, the little paragraph is displayed on the top of the owl-wrapper div, but I would like it to be centered vertically:
<div class="container">
<div class="caption text-center text-white" data-stellar-ratio="0.7">
<div id="owl-intro-text" class="owl-carousel">
<div class="item">
<h1>Oscar Götting</h1>
</div>
<div class="item">
<h1>Let's build something together</h1>
</div>
</div>
</div>
</div>
Add this to your CSS
.owl-carousel .owl-stage { display: flex; align-items: center; }
I'm with Bootstrap 4 alpha 3 and I need a simply vertical alignment of this code in page with this code:
<div class="container">
<div class="row">
<div class="col-sm-4" style="background-color:#ff0000;">Prova</div>
<div class="col-sm-4">
<h1 class="text-xs-center">HELLO!</h1>
</div>
<div class="col-sm-4"></div>
</div>
</div>
If you can opt to use v4's flexbox mode, the columns will have the same height automatically.
Then to vertically align the text, add display: flex and align-items: center to the desired column.
I have a layout that i need to build as can be seen in the image:
Grey stands for header, and there are no problems there. As for the body, I've split it into 3 divs as follows:
<div class="row">
<div class="col-lg-3">
<p>text positioned right here</p>
</div>
<div class="col-lg-6">
<img src="path/to/image.jpg">
</div>
<div class="col-lg-3">
<p>text positioned right here</p>
</div>
</div>
The problem I have is that I need that text to be vertically centered, and I don't know how. I've tried this solution Twitter Bootstrap 3, vertically center content but it doesn't seem to work for me (maybe I'm doing something wrong). I've tried adding padding-top to fix it, but it messes up the mobile display (as expected).
Please, can anyone help?
Thank you.
Text align property is only for horizontal text align, if you want to make text align vertically you need to use position property, we can make using text align something like that. for example: use center of the screen property.
position:relative;
left:50%; top:50%;
also minus margin property off of the container with.
The simplest way to center vertically is to add display:table to the containing element, and display:table-cell to the element you want centered. Bootstrap has a .text-center class to handle the horizontal centering.
http://www.bootply.com/lTigluKakK
Using your example as template:
<div class="col-xs-3 text-center v-align-container">
<p class="v-align-content">text positioned right here</p>
</div>
<div class="col-xs-6 text-center">
<img src="//placehold.it/400x400">
</div>
<div class="col-xs-3 text-center v-align-container">
<p class="v-align-content">text positioned right here</p>
</div>
CSS:
.v-align-container{display: table;height:400px} /* height set to match img (plus padding if needed) */
.v-align-content{display:table-cell;vertical-align:middle}
This works great if you're able to define the height of the sidebar divs. But, if you need them to match the height of the center element dynamically, you'll need a little more bootstrap magic to tie them together, but this will still apply to centering the content within those sidebars.