I have made a card using bootstrap. The columns work fine in all the devices. But they completely change in any ios devices. Screenshot attached.
http://projecttesting.tk/sfl/test.html
is my card on test server.
Fiddle: https://jsfiddle.net/Lhjm8ztn/
<section class="card__list row">
<div class="card__box col-md-12 col-sm-12">
<div class="card">
<div class="card__content">
<div></div>
<div class="ribbon"><span>Sponsored</span></div>
<div class="row card__bottom2">
<div class="col-6 col-sm-4 col-md-8 contest">
<img src="index.png" width="25px" height="25px"> <span class="card__title">MyTeam11</span>
<div class="date2">
<span class="time"> (2 Minutes Ago) </span>
</div>
</div>
<div class="col-3 col-sm-4 col-md-2 center3 card__price">
<span class="card__title">66%</span>
<div class="date">
Overlay
</div>
</div>
<div class="col-3 col-sm-4 col-md-2 center3 card__price">
<span class="card__title">25%</span>
<div class="date">
Margin
</div>
</div>
</div>
<div class="row card__bottom">
<div class="col-6 col-sm-4 col-md-4 col-lg-2 left options">
<span class="date weight">
1.6 Million Monster
</span>
<div class="date2">
43.6 % Overlay
</div>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-2 center card__price">
<span class="date weight"> ₹ 1600000</span>
<div class="date2">
Prizepool
</div>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-2 right left2 card__price">
<span class="date weight"> 55555</span>
<div class="date2">
Max Entries
</div>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-2 left center2 card__price">
<span class="date weight"> ₹ 35</span>
<div class="date2">
Entry Fee
</div>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-2 center left2 card__price">
<progress id="pb0" value="620" max="1760"></progress>
<div class="date2">
620/1760 Joined
</div>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-2 center2 right card__price">
<div class="date2">
<button type="button" class="btn btncs btn-primary">Join Now</button>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
I have tried to change the display property but it was not helpful.
add below code at the end of your css code i hope this should work in ios all sizes
#media(min-width:320px) and (max-width:1024px){
.left2 {
text-align: left !important;
}
.card__price {
text-align: right !important;
}
.left2 {
text-align: left !important;
}
}
Related
I was wondering if there was a way to make a row here hover? I want to point out I am not using a table to create this, but using the grid system in Bootstrap 4. Is it even possible? Everything I have researched points to that you need to create a table in order for this to happen.
<div class="row">
<div class="report-card-i report-card-i-height">
<h3 class="m-l-35 p-t-25 p-b-10">Compliance</h3>
<div class="fa-orange m-t-10 m-b-15 m-l-80">
<div class="row">
<div class="col-sm-1 col-xs-1 text-center">
<i class="fa fa-star m-r-15 text-center" style="font-weight: bold">Adjustment</i>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>21,922</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$304,012.23</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-1 text-center">
<i class="fa fa-angle-right text-center" style="font-weight: bold"></i>
</div>
</div>
</div>
</div>
.mydiv div:hover{background-color:gray;}
<div class="row">
<div class="report-card-i report-card-i-height">
<h3 class="m-l-35 p-t-25 p-b-10">Compliance</h3>
<div class="fa-orange m-t-10 m-b-15 m-l-80">
<div class="row mydiv">
<div class="col-sm-1 col-xs-1 text-center">
<i class="fa fa-star m-r-15 text-center" style="font-weight: bold">Adjustment</i>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>21,922</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$304,012.23</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-2 col-lg-offset-1 text-center">
<p>$0.00</p>
</div>
<div class="col-sm-1 col-xs-1 text-center">
<i class="fa fa-angle-right text-center" style="font-weight: bold"></i>
</div>
</div>
</div>
</div>
I would change
<div class="fa-orange m-t-10 m-b-15 m-l-80">
<div class="row">
to
<div class="fa-orange m-t-10 m-b-15 m-l-80">
<div class="row highlight">
so that the following css selector only targets rows with the .highlight class:
.row.highlight:hover > * {
background-color: #123456;
}
With this code when the width of the container is less than 792px the content of the div with the class 'col-xs-6' disappear.
<div class="cont">
<div class="top">
<div class="col-md-3 text-center col-xs-6">
<small>id:</small>
0001
</div>
<div class="col-md-3 text-center col-xs-6">
<small>reference:</small>
PRJ1
</div>
<div class="col-md-3 text-center">
<small>name:</small>
Project 1
</div>
</div>
</div>
how can I display it?
add class name row to top class
<div class="cont">
<div class="top row">
<div class="col-md-3 text-center col-xs-6">
<small>id:</small>
0001
</div>
<div class="col-md-3 text-center col-xs-6">
<small>reference:</small>
PRJ1
</div>
<div class="col-md-3 text-center">
<small>name:</small>
Project 1
</div>
</div>
</div>
I want to align these elements in mobile view
I want that on mobile devices the images are on top of the text and not on the side.
<div class="container">
<div class="row vcenter">
<div class="col-xs-12 col-sm-6 col-md-2">
<h3>Why Us?</h3>
</div>
<div class="col-xs-12 col-sm-6 col-md-10 items_why">
<div class="col-xs-12 col-sm-6 col-md-3">
<img src="/assets/img/icons/destination_expert.png">
<span>Destination Expert</span>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<img src="/assets/img/icons/faster.png">
<span>Faster</span>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<img src="/assets/img/icons/transparent.png">
<span>Transparent</span>
</div>
<div class="col-xs-12 col-sm-6 col-md-3">
<img src="/assets/img/icons/cheaper.png">
<span>Cheaper</span>
</div>
</div>
</div>
</div>
The <div>s containing <span>s should be contained in another row so they can be part of another grid within the grid.
<div class="container">
<div class="row vcenter">
<div class="col-xs-12 col-sm-12 col-md-2">
<h3>Why Us?</h3>
</div>
<div class="col-xs-12 col-sm-12 col-md-10">
<div class="row">
<div class="col-xs-12 col-md-1">
<img src="/assets/img/icons/destination_expert.png">
</div>
<div class="col-xs-12 col-md-2">
<span>Destination Expert</span>
</div>
<div class="col-xs-12 col-md-1">
<img src="/assets/img/icons/faster.png">
</div>
<div class="col-xs-12 col-md-2">
<span>Faster</span>
</div>
<div class="col-xs-12 col-md-1">
<img src="/assets/img/icons/transparent.png">
</div>
<div class="col-xs-12 col-md-2">
<span>Transparent</span>
</div>
<div class="col-xs-12 col-md-1">
<img src="/assets/img/icons/cheaper.png">
</div>
<div class="col-xs-12 col-md-2">
<span>Cheaper</span>
</div>
</div>
</div>
</div>
</div>
You can try it here: https://www.bootply.com/new
I have a Div below which is a button and as my screensize changes height of the Div changes due to which the button changes its position sometimes it hides behind the Div as I have provided z-index. How can I make position of the button fixed with respect to the Div even when the screensize changes?
Here is my HTML code:--
<div class="row" id="event">
<div class="col-lg-1 col-md-1 col-xs-1"></div>
<div class="col-lg-10 col-md-10 col-xs-10 ">
<section *ngFor="let event of events; let i = index" [style.backgroundColor] = "colorsArray[i]" class="eventSectionCSS">
<legend class="legendCSS"> {{event.title}}</legend>
<br>
<div class="row" style="margin-left: 15px;" >
<div class="col-lg-6 col-md-6 col-xs-6" style="display: inherit;" >
<div class="row" >
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-6">
<h2 class="presenterNameCSS" >{{ event.SMEPresentedByFirstName | uppercase}} </h2>
</div>
<div class="col-md-6 col-lg-6 col-sm-6 col-xs-6" style="margin-left: -10px;" >
<h2 class="presenterNameCSS" > {{ event.SMEPresentedByLastName | uppercase}} </h2>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3" ></div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3" id="image__event_both" >
<div class="col-lg-6 col-md-6 col-xs-6">
<div class="flip-container" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front">
<img id="image__1" (click) = "clickToShare()" src="../assets/img/Fwd Icons/share.png" >
</div>
<div class="back">
<div class="row" >
<section class="widget sharing_events_widget">
<share-buttons (click) = "closeShareIt(i)" [url]="'http://mentoriaweb.azurewebsites.net/#/app/Login'"
[count]="false"
[totalCount]="true"
[defaultStyle]= "true"
(popUpClosed) = "true"
[google]="googleInner"
[pinterest]="false"
[linkedIn]="false"
[tumblr]="tumblrInner"
[reddit]="false"
[stumbleUpOn]="false">
</share-buttons>
</section>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-xs-6">
<img id="image__2" (click) = "notifyMe(event.uid)" src="../assets/img/Fwd Icons/notify.png" >
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 presenterImageDivCSS " >
<img style="margin-left: 31px;" src="assets/img/avatar.png">
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<p class="smeSnippetCSS" > {{event.snippet}} </p>
<a style="color:#fff;" >...Read more</a>
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 dashed_height"style="">
<div class="date1" >{{event.eventDate*1000 | date:'dd'}}</div>
<div class="date2"><b>{{event.eventDate*1000 | date:'MMM' | uppercase}}</b> <br>
<p class="date3">{{event.eventDate*1000 | date:'yyyy'}}</p>
</div>
<div class="date4"> <b>{{ event.eventDate | date:'hh:mm a'}}</b></div>
</div>
</div>
<br>
</section>
<div>
<button class="btn btn-primary width-100 mb-xs" id="sme_register" role="button" ><span class="sme_buttonn"><b> Register</b></span> </button>
</div>
</div>
<div class="col-md-1 col-lg-1 col-xs-1"></div>
</div>
You can achieve this by using position relative. Position fixed is respective to the screen.
The fiddle you updated is not showing what actually are upto. I can't see position fixed on button.
Im using bootstrap. Need to place two cards of equal row-height. Each card is placed inside col-xs-6. Card contains text and buttons. When i use col-height col-xs-6 card both the card join together. Could be please help me on this.
<div class="row">
<div class="row-height">
<div class="col-height col-middle col-xs-6 card">
<div class="row">
<div class="col-xs-12 text-center">
<h3 class="heading-s1">Login</h3>
</div>
<div class="col-xs-12 text-center">
Login!
</div>
</div>
</div>
<div class="col-height col-middle col-xs-6 card">
<div class="row">
<div class="col-xs-12 text-center">
<h3 class="heading-s1">Sign UP</h3>
</div>
<div class="col-xs-12 text-center">
Sign Up!
</div>
</div>
</div>
</div>
</div>
Is that you want?
.row should be wrapped into .container
.card {
border: 1px solid black;
margin: 10px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row-height">
<div class="row">
<div class="col-height col-middle col-xs-5 pull-left card">
<div class="col-xs-12 text-center">
<h3 class="heading-s1">Login</h3>
</div>
<div class="col-xs-12 text-center">
Login!
</div>
</div>
<div class="col-height col-middle col-xs-5 pull-right card">
<div class="col-xs-12 text-center">
<h3 class="heading-s1">Sign UP</h3>
</div>
<div class="col-xs-12 text-center">
Sign Up!
</div>
</div>
</div>
</div>
</div>