Why is min-height:100vh not working on container? - html

I wanted the social media icons to be visible without scrolling. This has worked before, is there a reason it's not? It doesn't seem to be the images taking up space.
I placed min-height:100vh on .container, HTML and body tag I didn't see any results. I changed the size height images and that also didn't get my desired result.
html {
height: 100%;
}
body {
background-color: #e2e2e2;
font-family: "Montserrat", sans-serif;
font-weight: 500; }
/* min height */
.container {
white-space: nowrap;
min-height: 100vh;
}
<div class="container"><nav>
<div class="site_header">
<img alt="nav logo" class="logo" src="https://i.imgur.com/1SxQJfI.png">
<div class="right">
<div class="class_button">
<a class="">CLASSES</a>
</div>
<img alt="menu button" class="menu" src="https://i.imgur.com/beUooBz.png">
</div>
</nav>
<div id="slider">
<div class="slider_child" id="slider_child">
<div class="image_con" style="left: 50%; opacity: 1">
<img src="https://i.imgur.com/xvYImiF.png" class="img1" />
</div>
<div class="image_con" style="left: 40%; opacity: 0">
<img src="https://i.imgur.com/hYnjyMy.png" class="img2" />
</div>
<div class="image_con" style="left: 40%; opacity: 0">
<img src="https://i.imgur.com/kGZ5oCv.png" class="img3" />
</div>
</div>
<!--ARROW AND TEXT ISSUE -->
<a class="slidenext" onclick="nextSlide();">
<img src="https://i.imgur.com/GASeP9Y.png" class="arrow_icon" />
<div class="grow">GROW</div>
</a>
<a class="slideprev" onclick="prevSlide();"><img src="https://i.imgur.com/WLkS6Jk.png" class="arrow_icon" />
<div class="shift">SHIFT</div>
</a>
<div class="title_holder">
<div class="title lineheight">
IR
</div>
<div class="title lineheight">
REG
</div>
<div class="title">
ULAR
</div>
<div class="button">
<a class="learn_more">LEARN MORE</a>
</div>
</div>
</div>
<!-- footer social media and slideshow numbers-->
<p>
#follow us
</p>
<div class="footer">
<img src="https://i.imgur.com/rCkPv9i.png alt="instagram link" class="social_icons ig" />
<img src="https://i.imgur.com/9rmiZY1.png" alt="facebook link" class="social_icons" />
</div>
</div>
</div>
</div>
codepen

Change your slider image height to 630px. It should place the whole container within 100vh. #slider { height: 630px }. Another tip: If you are using flexbox. You don't need absolute positioning for footer in this case.

Related

How to rotate first element wit flexbox and make it full-height?

I try to implement this graphic with HTML, CSS using flexbox:
Now, I have trouble with the left part. I don't know how to implement this -90 degrees rotated element. The right part (all elements that are horizontally aligned) is not the problem.
Here is what I have so far:
.container {
max-width: 1176px;
width: 100%!important;
margin: 0 auto!important;
float: none!important;
z-index: 1;
}
.pt {
padding-top: 3.5rem;
/* 56px */
}
.pb {
padding-bottom: 3rem;
/* 48px */
}
.ptms {
padding-top: 1.5rem;
/* 24px */
}
.full-width {
width: 100%;
padding: 0 1.5rem;
}
.three-col {
width: 33.3333334%;
padding: 0 1.5rem;
}
.platform-container,
.platform-card-container {
display: flex;
}
.platform-card-container .three-col,
.platform-card-container .full-width {
padding: 0 .75rem;
}
.platform-card-container a {
text-decoration: none;
}
.platform-card,
.platform-card-first {
border-radius: .5rem;
box-shadow: 0 .25rem .75rem 0 rgba(27, 27, 27, 0.24);
display: flex;
height: 100%;
}
.platform-card {
align-items: center;
}
.platform-card-first {
}
.platform-card-icon {
padding: .75rem;
border-radius: 50%;
background-color: #f5f5f5;
width: 3.5rem;
height: 3.5rem;
min-width: 3.5rem;
}
.platform-card-text {
margin-left: 1rem;
}
.platform-card-text-title {
margin-bottom: .5rem;
color: #1b1b1b;
}
.platform-card-text-desc {
color: #007095;
}
<div class="container platform-container">
<div>
<div class="pt platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card-first">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-technology-3d-printing-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Open Architecture</h4>
<div class="platform-card-text-desc">Extend systems as required</div>
</div>
</div>
</a>
</div>
</div>
</div>
<div>
<div class="pt platform-card-container">
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-design-ruler-triangle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">User Interface</h4>
<div class="platform-card-text-desc">Modern front-end technologies</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-mobile-phone-location-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Intelligent Mobility</h4>
<div class="platform-card-text-desc">Mobile and offline access</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-network-monitor-team-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Social Collaboration</h4>
<div class="platform-card-text-desc">Efficient teamwork</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-toys-lego-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Low-Code Suppport</h4>
<div class="platform-card-text-desc">Processes without programming</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-multimedia-shuffle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Business Rule Engine</h4>
<div class="platform-card-text-desc">Intelligent decision making</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-programming-module-puzzle-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Integration</h4>
<div class="platform-card-text-desc">Standard connectors and more</div>
</div>
</div>
</a>
</div>
<div class="three-col">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-transportation-road-sign-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Adaptive Case Management</h4>
<div class="platform-card-text-desc">Making processes flexible</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-interface-settings-cog-double-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Process Engine</h4>
<div class="platform-card-text-desc">Powerful process automation</div>
</div>
</div>
</a>
</div>
</div>
<div class="ptms platform-card-container">
<div class="full-width">
<a href="">
<div class="platform-card">
<div class="platform-card-icon">
<img src="img/icons/axonivy-website-icon-work-presentation-projector-screen-darkblue.svg">
</div>
<div class="platform-card-text">
<h4 class="platform-card-text-title">Modern Runtime Platform</h4>
<div class="platform-card-text-desc">Environment with container support</div>
</div>
</div>
</a>
</div>
</div>
</div>
Does anyone have a hint on how I should proceed?
I believe these styles are what you want:
text-align: right;
writing-mode: vertical-rl;
transform: rotate(180deg);
text-orientation: mixed;
https://jsfiddle.net/aycq2v8u/
edit: I noticed that the height still wasn't right. (BTW, display:grid makes this sort of thing easier). here's a revision with that fixed as well. although, this does require either ridiculous looking selectors or changes to the html, which I have done here: https://jsfiddle.net/rxgbo4a9/
changes required:
the card container of the first card (that needs to be full height) needs to be different. since it is on the side and generally different content, I marked it as an aside:
<aside class="pt platform-card-container">
then, with that, using minimal changes to your css we get the desired result:
aside.platform-card-container {
height:100%
}
aside.platform-card-container a {
display: flex;
height: 100%
}
note that specifying height instead of using flexbox is not ideal. however, since all your code makes the same mistake, I think you minimize technical debt to keep all the problems of the same type .. ie, keep using height until you are ready to remove it generally.

my images (tagged under div s) are unable to sit side by side on the same row

My images won't sit side by side & I'm not sure why.
I've set the display to be inline and it still doesn't work.
I think i should mention that i'd like the 4 colourful buttons to be grouped as how they are now, 2 on top and 2 on the bottom, but i'd still like for it to be inline with the logo and the pfp image..
Here's what I have for the css page so far.
and here's how they currently sit
*the 'vengage' box is the logo, so it should sit like
on 1 row [vengage][home][settings] [pfp]
and then have [fyp] [search] directly underneath the home & settings buttons
if it's useful, this is along the lines of how i'd like them to sit on the webpage if possible
* {
box-sizing: border-box;
}
body {
width: 999px;
height: 1000px;
text-decoration: none;
}
.logo {
padding: 5px;
display: flex;
}
.menu {
display: flex;
flex-direction: row;
}
<div class='menu'>
<div class='logo'>
<img src='https://via.placeholder.com/140x100?text=LOGO' width='100'>
</div>
<div class='above'>
<div class='homebutton'>
<a href='Code draft.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
<div class='settingsbutton'>
<a href='menusettings.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
<div class='below'>
<div class='fypbutton'>
<a href='fyp.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
<div class='searchbutton'>
<a href='search.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
<div class="pfp">
<a href="Profile Page.html">
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
Remove display: inline from menu class and add display: flex again if you want to align all the elements with the logo than just change the position of menu div, make it as a mother div. Hope it solves your problem
* {
box-sizing: border-box;
}
body {
display: inline-block;
width: 999px;
height: 1000px;
text-decoration: none;
}
.logo {
padding: 5px;
display: inline;
}
.menu {
display: flex;
}
<div class='menu'>
<div class='logo'>
<img src='https://i.ibb.co/h9L3Fyq/logo.jpg' width='100'>
</div>
<div class='above'>
<div class='homebutton'>
<a href='Code draft.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
<div class='settingsbutton'>
<a href='menusettings.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
<div class='below'>
<div class='fypbutton'>
<a href='fyp.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
<div class='searchbutton'>
<a href='search.html'>
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
<div class="pfp">
<a href="Profile Page.html">
<img src='https://via.placeholder.com/140x100' width='50'>
</a>
</div>
</div>
try this instead,
Add display:flex; to body. also add vertical-align:top;to all image
that is
body{
display:flex;
}
img{
vertical-align:top;
}
* {
box-sizing: border-box;
}
body{
width: 999px;
height: 1000px;
text-decoration: none;
display:flex;
}
img{
vertical-align:top;
border:1px solid #111;
}
<div class='logo'>
<img src='https://i.stack.imgur.com/8U82Z.png' width ="75px">
</div>
<div class = 'menu'>
<div class = 'above'></div>
<div class = 'homebutton'>
<a href = 'Code draft.html'>
<img src = 'https://i.stack.imgur.com/QM11G.png' width = "50px">
</a>
</div>
<div class = 'settingsbutton'>
<a href = 'menusettings.html'>
<img src = 'https://i.stack.imgur.com/LFcP2.png' width = "50px">
</a>
</div>
</div>
<div class = 'below'>
<div class = 'fypbutton'>
<a href = 'fyp.html'>
<img src = 'https://i.stack.imgur.com/rV49R.png' width = "50px">
</a>
</div>
<div class = 'searchbutton'>
<a href = 'search.html'>
<img src = 'https://i.stack.imgur.com/z6gVZ.png' width = "50px">
</a>
</div>
</div>
<div class="pfp">
<a href="Profile Page.html">
<img src='https://i.stack.imgur.com/qpEQy.png' width = "29px">
</a>
</div>
</div>

Need Images Touching Together, No Gutter

Hey StackOverFlow Community,
I need to get these images touching together. They will eventually be much larger and touching the edge of the browser. These will be tiles that lead to examples of film work, currently have placeholder images.
I have tried and tried to get these images touching, but I'm not sure what is going on... set the margin and padding to 0.
Here is the code.
HTML
<section id="video-section" class="portfolio">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-1 text-center">
<h2>Video Production</h2>
<hr class="small">
</div>
<div class="container-fluid full-width has-inner">
<div class="row row-no-gutter">
<div class="col-md-4 nogut">
<div id="image1" class="video-item">
<a href="https://vimeo.com/208403633">
<img id="portfolio1" class="img-full-width" src="img/image1.jpg">
</a>
</div>
</div>
<div class="col-md-4 nogut">
<div id="image2" class="video-item">
<a href="#">
<img class="img-full-width" src="img/image2.jpg">
</a>
</div>
</div>
<div class="col-md-4 nogut">
<div id="image3" class="video-item">
<a href="#">
<img class="img-full-width" src="img/image3.jpg">
</a>
</div>
</div>
</div>
<div class="row row-no-gutter">
<div class="col-md-4">
<div id="image4" class="video-item">
<a href="#">
<img class="img-full-width" src="img/image4.jpg">
</a>
</div>
</div>
<div class="col-md-4">
<div id="image5" class="video-item">
<a href="#">
<img class="img-full-width" src="img/image5.jpg">
</a>
</div>
</div>
<div class="col-md-4">
<div id ="image6" class="video-item">
<a href="#">
<img class="img-full-width" src="img/image6.jpg">
</a>
</div>
</div>
</div>
<!-- /.row (nested) -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</section>
CSS
#video-section {
padding: 10px;
background: #353030;
color: white;
}
.containter-fluid .full-width {
padding-left: 0px;
padding-right: 0px;
overflow-x: hidden;
}
.row .row-no-gutter {
margin: 0px;
padding: 0px;
}
.nogut {
margin: 0px;
}
.img-full-width {
width: 100.5%;
height: auto;
}
Been spending a few hours trying to figure this out, what am I doing wrong?
Paddings are not on rows but on cols.
And it's not margin, so you .nogut will not work :)
You had almost the right answer, try this :
.no-gutter > [class*='col-'] {
padding-right:0;
padding-left:0;
}
Then in your html :
<div class="row no-gutter">
First, right click in browser and use inspect (I think it is best in chrome.) Klick on this icon. Hover over your images and you will able to see which element the gap belongs to. When clicking the element you can in the styles section untick (and add) different css properties and see what happens. Very powerfull tool.
For you, I would also recommend to add padding: 0px; to .nogot and add that class to the second row also.

Can not get the element to be at the bottom of the page

Basically the idea is that I have a picture galery and at the bottom there should be a load more bar. I have tried a lot of different options of using the bottom tag but somehow the element always stays right after the div that is above him. What should I change to make it work?
.portfolio_bottom {
padding: 2em 0;
position: absolute;
bottom: 0px;
}
<body>
<div class="portfolio s1" id="portfolio">
<div class="portfolio_box">
<div class="col_1_of_4 span_1_of_4">
<a href="#" class="b-link-stripe b-animate-go thickbox">
<img src="images/p1.jpg" class="img-responsive" alt=""/>
<div class="b-wrapper">
<h2 class="b-animate b-from-left b-delay03 ">
<img src="images/p_logo.png" class="img-responsive" alt=""/>
<span>Cerkve</span>
<button>Odpri galerijo</button>
<label> &#x1f4c5 10.6.2016 </label>
</h2>
</div>
</a>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="portfolio_bottom">
<a class="btn3" href="#"><span>Loadmore</span></a>
</div>
<script src="js/bootstrap.min.js"></script>
</body>
Assign position:relative to the parent element.
#portfolio {position:relative;}

Trying to get text to overlap circular image to behave upon resizing with bootstrap

I have a page where I'd like to have a row of circular images with text on them that can serve as links. I've figured out how to get this to work for the general case of a full sized webpage, but when I resize the width of the page, the text doesn't scale with the image because I have to use absolute positions. Here's the html:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
<div class="col-md-3">
<a class= href="">
<img src="http://placehold.it/500x500" class="align-center img-responsive img-circle button-pic" />
<div class="button-caption">Button</div>
</a>
</div>
</div>
</div>
</body>
</html>
Here's the main.css page...
body {
max-width: 900px;
margin: 0 auto;
}
.container {
width: 100%;
}
.button-pic {
opacity: 0.4;
position: relative;
}
.button-caption {
text-align: center;
position: absolute;
top: 87px;
left: 85px;
}
I'd like to find a way to not have to set the top and left positions of the button-caption since not all of my labels will be the same length. Anyone have advice to offer?
If you want your text position to remain consistent to the image you'll need to use percentages instead of setting a fixed amount of pixels for the position since the images are responsive.
See working Snippet.
.content {
max-width: 900px;
margin: auto;
}
.button-pic {
opacity: 0.4;
position: relative;
margin: auto;
}
.button-caption {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Just a Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">Just a Really Very Pretty Long Label for a Button</span>
</a>
</div>
<div class="col-md-3">
<a href="#">
<img src="http://placehold.it/500x500" class="img-responsive img-circle button-pic" />
<span class="button-caption">A Button</span>
</a>
</div>
</div>
</div>
</div>