I'am trying to build responsive website using Materialized framework. I am having issue where my card positioning is not correct in IE. However, It is working fine in Firefox. I am not sure where the problem is occuring. My assumption is something related to the margin I've set to Auto.
I've tried to correct it in Style.CSS and Materialized.CSS in main {} and body {}. But still having issue.
Container:
.container {
margin: 0 auto;
max-width: 1280px;
width: 90%;
min-height: 100%;
}
Structure:
<main>
<div class="container main-content">
<!-- Test Automation Cards -->
<div class="col s12" style="padding-top: 40px;padding-bottom: 50px;text-align: center">
<p class="flow-text center">Design Tools</p>
</div>
<div class="row" style="display: flex;flex-wrap: wrap;justify-content: center;">
<div class="col s12 m6 l4" style="flex: 20%; max-width: 30%;box-sizing: border-box;padding: 15px;">
<a href="http://agilehq/" target="_blank">
<div class="card waves-effect">
<div class="card-image">
<img src="img/agile.png">
<span class="card-title"></span>
</div>
<div class="card-content" style="text-align: center">
<p>Search Design Documents</p>
</div>
</div>
</a>
</div>
<div class="col s12 m6 l4" style="flex: 20%; max-width: 30%;box-sizing: border-box;padding: 15px;">
<a href="http://sharepoint/sites/wip/WorkInProgress/Forms/Project.aspx" target="_blank">
<div class="card waves-effect">
<div class="card-image">
<img src="img/folder.png">
<span class="card-title"></span>
</div>
<div class="card-content" style="text-align: center">
<p>WIP ShareDrive</p>
</div>
</div>
</a>
</div>
<div class="col s12 m6 l4" style="flex: 20%; max-width: 30%;box-sizing: border-box;padding: 15px;">
<a href="http://crdr/" target="_blank">
<div class="card waves-effect">
<div class="card-image">
<img src="img/tfs.jpg">
<span class="card-title"></span>
</div>
<div class="card-content" style="text-align: center">
<p>CRDR</p>
</div>
</div>
</a>
</div>
</div>
</div>
</main>
Main:
main {
flex: 1 0 auto;
}
Output is different in Firefox then IE.
Check Both Screenshot Here.
Related
I am close to achieving this look and behavior but I am having issues with the scrolling of the right column. The scroll bar appears but does not scroll the content on the right column. Should look like this:
.
Currently looks like this:
There are probably multiple approaches or changes I can take or make but any suggestions are welcome! Code is provided below.
.scroller {
overflow-x: scroll;
white-space: nowrap;
}
.row {
display: flex;
flex-wrap: nowrap;
}
.col-md-4 {
min-width: 240px;
}
.col-md-8 {
flex-grow: 1;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div class="row">
<div class="col-4" style="min-width: 240px;">
<div class="row pb-1">
<div class="col-3 offset-3">
<b>NAME</b>
</div>
</div>
<div class="row row-striped align-items-center pb-1 pt-1">
<div class="col-3">
<img src="https://media.api-sports.io/football/players/730.png" alt="player photo" width="40px" height="40px">
</div>
<div class="col-9 player-table-text">
<div>
Thibaut Courtois
<span class="ps-1 player-number-text">1</span>
</div>
</div>
</div>
</div>
<div class="col scroller" style="min-width: 500px;">
<div class="row pb-1">
<div class="col-2 offset-1">
<b>POS</b>
</div>
<div class="col-2">
<b>AGE</b>
</div>
<div class="col-2">
<b>HT</b>
</div>
<div class="col-2">
<b>WT</b>
</div>
<div class="col-2">
<b>NAT</b>
</div>
</div>
<div class="row row-striped align-items-center pb-1 pt-1 player-table-text" style="height:48px;">
<div class="col-2 offset-1">
GK
</div>
<div class="col-2">
30
</div>
<div class="col-2">
6' 7"
</div>
<div class="col-2">
212 lbs
</div>
<div class="col-2">Belgium</div>
</div>
</div>
</div>
I have 7 images. I need to see 5 images in one row, and 2 more images in another row below in the center. I made 5 images in a row, but I can not position the other 2 images in the center below. Also, in responsive version I need 2 images under each other and 1 image in the center and they need to have border-radius:100%, but it does not work. What`s wrong with my code?
This is html:
#media all and (max-width: 1024px) {
.ring {
border-radius: 100%;
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-sm col-6">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="0.1s" style="border-radius: 0;">
<img src="img/1.jpg" style="border-radius: 100%;">
</div>
</div>
<div class="col-sm col-6">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="0.3s" style="border-radius: 0;">
<img src="img/2.jpg" style="border-radius: 100%;">
</div>
</div>
<div class="col-sm col-6 hightechxl">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="0.5s" style="border-radius: 0;">
<img src="img/1.jpg" style="border-radius: 100%;">
</div>
</div>
<div class="col-sm col-6">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="0.7s" style="border-radius: 0;">
<img src="img/2.png" style="border-radius: 100%;">
</div>
</div>
<div class="col-sm col-6">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="0.9s" style="border-radius: 0;">
<img src="img/1.png" style="border-radius: 100%;">
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="1.1s" style="border-radius: 0;">
<img src="img/2.png" style="border-radius: 100%; width: 150px; height: 150px;">
</div>
</div>
<div class="col-sm">
<div class="single-specials text-center wow fadeInUp" data-wow-delay="1.3s" style="border-radius: 0;">
<img src="img/1.png" style="border-radius: 100%;">
</div>
</div>
</div>
</div>
I am using bootstrap4, if there is another decision without bootstrap, please, show me how.
I just make to demonstrate code for you at: https://codepen.io/tien-bui/pen/mamemO
So the basic ideas of Bootstrap is every row have 12 col, so if you want to display 5 item in 1 row you need to set the col prefix at 2. For example: target small screen col-sm-2, target large screen col-lg-2. And you need to target all the device to achieve the responsive, it will look like this:
<div class="col-lg-2 col-md-2 col-sm-6 col-6"></div>
You can use flex, set width to 18% for example - that little less than 20% , which can take 5 items and it will give you some space for margin.
Use media query for the second version and set flex-basis to 48%.
.cont{
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.item{
flex-basis: 18%;
flex-shrink: 0;
flex-grow: 0;
border: 1px solid black;
height: 50px;
margin: 5px;
}
#media all and (max-width: 1024px) {
.item {
flex-basis: 48%;
}
}
<div class="cont">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
</div>
So I'm in a coding Boot camp, been coding for a little over 1.5 months. For one of my assignments, I was to create a mobile responsive portfolio using Bootstrap. The directions clearly stated not to use media queries, as the queries are under the hood on of my TAs told me. Inasmuch as I'm not allowed to implement explicit use of queries, I seem to be stumped. I already turned the assignment is, but dont want to skim ovedr the solution - if there is one. Here is my html:
<div class="container" id="page">
<div class="row">
<div class="col-md-8 col-xs-12">
<div class="container-fluid">
<div class="panel" id="main-section">
<div class="panel-heading">
<h4 id="headings">Portfolio</h4>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="hangman.jpg" class="image-responsive" id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff" id="text-box">Hangman</p>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rpg.jpg" class="image-responsive" id="images-right">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff">Role Player Game</p>
</div>
</div>
</div>
</div>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="trivia.jpg" class="image-responsive" id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff"`enter code here`>Trivia</p>
</div>
</div>
</div>
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rutgers.jpg" class="image-responsive" id="images-right">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff" id="text-box">Rutgers Info Widget</p>
</div>
</div>
</div>
</div>
<div class="row" id="box-search">
<div class="col-md-6 col-xs-12">
<div class="thumbnail text-center">
<img src="rps.jpg " class="image-responsive " id="images-left">
<div class="caption">
<p style="background-color: #2c3e50; color: #ffffff;" id="text-box">Rock Paper Scissors</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
and the css:
.thumbnail {
position: relative;
}
.caption {
position: absolute;
top: 75%;
left: 0px;
width: 190px;
text-align: center;
}
#images-left,
#images-right {
height: 190px;
width: 190px;
}
/*portfolio styling*/
#main-section-port {
min-width: 300px;
max-width: 640px;
float: left;
background-color: #ffffff;
margin-bottom: 80px;
}
and here is a link to the actual website if you'd like to see: afflatus480.github.io
Again, I already submitted the work, so no need to rush. But any help will be appreciated nonetheless. Thank you for your time.
I'm trying to get these 3 pictures in a row with no or little spaces in between, but this code is causing them to stack on top of each other. I also want them to be aligned to the center of the page.
<div class="container">
<div class="row col-xs-2">
<img style= "width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt">
</div>
<div class="row col-xs-2">
<img style= "width: 25%; height: 25%" src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog">
</div>
<div class="row col-xs-2">
<img style= "width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically">
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-xs-4 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
<div class="col-lg-4 col-md-4 col-xs-4 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
<div class="col-lg-4 col-md-4 col-xs-4 thumb">
<a class="thumbnail" href="#">
<img class="img-responsive" src="http://placehold.it/400x300" alt="">
</a>
</div>
your code should be like this..
dont put class row on every col..
<div class="container">
<div class="row">
<div class="col-xs-2">
<img style="width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt">
</div>
<div class="col-xs-2">
<img style="width: 25%; height: 25%" src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog">
</div>
<div class="col-xs-2">
<img style="width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically">
</div>
</div>
</div>
sample code
**YOu need to put everthing in row then add one div with a class .center make the div center finally offset the the first column**
==============================================================
<style>
/*CENTER COLUMN */
.align-center {
text-align: center;
}
/*CENTER DIV*/
.center {
margin: 0 auto;
width: 80%;
}
</style>
<div class="container">
<div class="row">
<div class="center">
<div class="col-xs-2 align-center col-xs-offset-3"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt"> </div>
<div class="col-xs-2 align-center"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog"> </div>
<div class="col-xs-2 align-center"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically"> </div>
</div>
</div>
</div>
<img style= "width: 25%; height: 25%" src="webfina/2.png" alt="Kermit the Dog">
<img style= "width: 25%; height: 25%" src="webfina/3.png" alt="Peach posing magestically">
This seems to be my 2nd question regarding Twitter Bootstrap Grid system - but I'm fumbled.
I'm trying to build an image gallery, where each slide has an interesting layout. The JavaScript part is no problem (yay jQuery!) - it is the CSS/HTML part I'm stuck with.
Here's what I got so far - jsfiddle
<div class="container" style="padding-top: 20px; position: relative; padding-bottom: 20%; height: 0; overflow: hidden">
<div class="flexslider" style="position: absolute; top: 0; left: 0; padding-top: 20px; padding-bottom: 20px; width: 100%; height: 100%">
<ul class="slides">
<li>
<!-- Slide #1 -->
<div class="row">
<div class="col-xs-offset-2 col-xs-3" style=""> <a href="#" class="thumbnail">
<img src="img/bg-blur/IMG_8446.jpg">
<div class="thumbtext"><h3>TEXT</h3></div>
</a>
</div>
<div class="col-xs-5">
<div class="row">
<div class="col-xs-4"> <a href="#" class="thumbnail">
<img src="img/bg-blur/IMG_8757.jpg">
<div class="thmbtxt">Description</div>
</a>
</div>
<div class="col-xs-4"> <a href="#" class="thumbnail">
<img src="img/bg-blur/IMG_8848.jpg">
<div class="thmbtxt">Description</div>
</a>
</div>
<div class="col-xs-4"> <a href="#" class="thumbnail">
<img src="img/bg-blur/IMG_8864k.jpg">
<div class="thmbtxt">Description</div>
</a>
</div>
<div class="col-xs-6"> <a href="#" class="thumbnail">
<img src="img/bg-blur/noga.jpg">
<div class="thmbtxt">Description</div>
</a>
</div>
<div class="col-xs-6"> <a href="#" class="thumbnail">
<img src="img/bg-blur/untitled-(1-of-11).jpg">
<div class="thmbtxt">Description</div>
</a>
</div>
</div>
</div>
<div class="col-xs-2"></div>
</div>
</li>
</ul>
</div>
</div>
If you notice, the left-most image takes up only 1 row. What I'm trying to do is automatically resize it (the block in which it is sitting in), so it takes up the entire height of the 2 rows. This way it would look neat and symetrical.
Any ideas or thoughts about this?