I have the following movie element:
And this is the corresponding HTML:
<div class="bottom d-flex">
<div class="video-controls time-segment p-2">
<button class="btn-control btn-"><span class="fa fa-undo"></span></button>
<button class="btn-control btn-step-backward"><span
class="fa fa-step-backward"></span></button>
<button *ngIf="!widget.moviePlaying" class="btn-control btn-play" (click)="playPauseMovie(widget)"><span class="fa fa-play"></span></button>
<button *ngIf="widget.moviePlaying" class="btn-control btn-pause" (click)="playPauseMovie(widget)"><span class="fa fa-pause"></span></button>
<button class="btn-control btn-step-forward"><span
class="fa fa-step-forward"></span></button>
<button class="btn-control btn-reset" hidden><span class="fa fa-undo"></span></button>
</div>
<div id="frames-indicator">
<span id="seekBarLabel">Frame {{ moviesFrames.current }}/{{ moviesFrames.total }}</span>
</div>
<div class="widget-controls ml-auto">
<button class="btn-control btn-play" (click)="setSize(widget, 1, $event, gridster1)"><span
class="fa fa-clone"></span></button>
<button *ngIf="!widget.linked" class="btn-control btn-" (click)="toggleLinked(widget)"><span
class="fa fa-chain-broken"></span></button>
<button *ngIf="widget.linked" class="btn-control btn-step-backward" (click)="toggleLinked(widget)"><span class="fa fa-link"></span></button>
<button class="btn-control btn-play" (click)="setSize(widget, -1, $event, gridster1)"><span
class="fa fa-minus"></span></button>
<button class="btn-control btn-play" (click)="setSize(widget, 1, $event, gridster1)"><span
class="fa fa-plus"></span></button>
</div>
</div>
As you can see:
div container has class="bottom d-flex"
div 1 has class class="video-controls time-segment p-2" and host buttons
div 2 just contain a span element
div 3 is right aligned and host buttons
I want div 1 and 3 to 'expand their width to display all buttons inline. I have tried width: max-content with no luck.
Any idea in how to achieve my goal?
SOLUTION
Thank you to everyone for trying to help. In the end I did not need to manipulate the CSS. The media breakpoint settings were wrong. I was generated the same number of movies per line in medium and large screens. On Medium screens the movies were too narrow causing the icons to stack vertically.
Posting my own solution in case might help someone.
Thank you to everyone for trying to help. In the end I did not need to manipulate the CSS. The media breakpoint settings were wrong. I was generated the same number of movies per line in medium and large screens. On Medium screens the movies were too narrow causing the icons to stack vertically.
Related
I have the following problem: i have a <div> and inside of that tag i have a button, but i cant center the button vertically and horizontally inside the <div> also i want the button to be center for phones for that i saw it toggle device toolbar
Really dont know how to solve it, im new using Angular
Below i will let the code of my <div> that has the button inside, the picture of how the button is displayed also i'm using Angular material
Div tag code
<div *ngIf="nav_bar==false" class="colour large">
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item [routerLink]="'/'">
<mat-icon>dialpad</mat-icon>
<span>Inicio</span>
</button>
<button mat-menu-item [routerLink]="['/nosotros']">
<mat-icon>voicemail</mat-icon>
<span>Nosotros</span>
</button>
<button mat-menu-item [routerLink]="['/contacto']">
<mat-icon>notifications_off</mat-icon>
<span>Contacto</span>
</button>
</mat-menu>
<button class="mat-button col-xs-3" (click)="nav_bar=!nav_bar">
<img src="./assets/icons/baseline_visibility_white_18dp.png" class="mdc-icon-button__icon"/>
</button>
</div>
It's not an angular thing, it's an html/css thing. If you're going to use bootstrap you might want to check out the grid documentation a bit to better familiarize yourself with how it works, along with the utility classes. Something like this would probably be more what you're looking for.
<div *ngIf="nav_bar==false" class="colour large d-flex align-items-center">
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item [routerLink]="'/'">
<mat-icon>dialpad</mat-icon>
<span>Inicio</span>
</button>
<button mat-menu-item [routerLink]="['/nosotros']">
<mat-icon>voicemail</mat-icon>
<span>Nosotros</span>
</button>
<button mat-menu-item [routerLink]="['/contacto']">
<mat-icon>notifications_off</mat-icon>
<span>Contacto</span>
</button>
</mat-menu>
<button class="mat-button mx-auto" (click)="nav_bar=!nav_bar">
<img src="./assets/icons/baseline_visibility_white_18dp.png" class="mdc-icon-button__icon"/>
</button>
</div>
I want to show a button with btn-lg size in extra small devices. and show same button with btn-xs size in another devices.
So is there better suggestion of below code?
<div class="hidden-xs">
<a class="btn btn-default btn-xs" href="#"><i class="fa fa-undo" aria-hidden="true"></i> Back</a>
</div>
<div class="visible-xs-block">
<a class="btn btn-default btn-lg" href="#"><i class="fa fa-undo" aria-hidden="true"></i> Back</a>
</div>
Given that I may have a piece of code is much bigger than a button code. Like this:
<div class="hidden-xs">
<!-- A LONG AND COMPLEX CODE IN HERE -->
</div>
<div class="visible-xs-block">
<!-- SAME LONG AND COMPLEX CODE IN HERE (with just change some classes of size) -->
</div>
I am displaying font awesome icons in row. when I click an icon it takes an action. and also I was trying to seelct an icon then it should show the option,when I click the option it should take an action.
Here is my code.
<div class="iconsInfo">
<div>
<div ng-if="isReply()" ng-click="replyMessage()" class="iconRow" title="Reply">
<i class="fa fa-reply"></i>
</div>
<div ng-if="isReplyAll()"ng-click="replyAll()" class="iconRow" title="Reply All">
<i class="fa fa-reply-all"></i>
</div>
<div ng-if="isForward()" ng-click="forwardMessage()" class="iconRow" title="Forward">
<i class="fa fa-reply fa-flip-horizontal"></i>
</div>
<div ng-if="!isDeleted()" ng-click="deleteMessage()" class="iconRow" title="Delete Message">
<i class="fa fa-trash"></i>
</div>
<div ng-show="canMoveToFolder()" class="iconRow">
<i class="fa fa-folder-o"> </i>
</div>
Here when I click on reply icon it calls replyMessage .when I click on folder icon it should show the options like sentToFolder1,sentToFolder2,when I click senttoFolder1 it calls an action. how to achieve this using fontawesome icons.
Using a button over a div would be a solution:
<button ng-if="isReply()" ng-click="replyMessage()" class="iconRow" title="Reply">
<i class="fa fa-reply"></i>
</button>
You may need to change your iconRow class a bit, depending on what it is. Based on the name, I imagine perhaps the wrapper would be a good place for the iconRow styling.
So here's the code:
<button class="btn btn-default btn-test" style="width:200px; white-space:normal;" id="up-arrow-div" >
<div class="col-xs-2 arrow-up-div" style="font-size:30 !important">
<span class="glyphicon glyphicon-collapse-up arrow-up" style="font-size:30 !important"></span>
</div>
<div class="col-xs-10">
Contribute more to support Last Minute Gear!
</div>
</button>
I've tried in 2 different places to make the glyphicon size bigger but to no avail. Output still looks like this:
Any thoughts?
change this:
<span class="glyphicon glyphicon-collapse-up arrow-up" style="font-size:30 !important"></span>
to this:
<span class="glyphicon glyphicon-collapse-up arrow-up" style="font-size:40px; !important"></span>
It appears you forgot to define a measurement type so I added px for you.
Let me know if that works
You are using style="font-size:30 !important"
You should use instead style="font-size:30px!important"
If I remove the tag the button aligns perfectly but it doesn't link. I've tried multiple combinations with the anchors and no success. Please help.
NOT ALIGNING MIDDLE:
<div class="span12" style="text-align:center">
<a href="mailto:partnerships#medicaldoctorapps.com">
<button class="btn btn-large btn-primary">Contact us to get started</button>
</a>
</div>
ALIGNS MIDDLE FINE BUT NO LINK OUT:
<div class="span12" style="text-align:center">
<button class="btn btn-large btn-primary">Contact us to get started</button>
</div>
You must have some other CSS conflicting, take a look here with no CSS they both look fine (http://jsfiddle.net/4kZ3p/). Have you used inspect element (https://developers.google.com/chrome-developer-tools/docs/elements)? its a handy tool when debugging CSS.
Look in the css for the A tag.
-Ken
Needed to add this code to get the jsfiddle to submit but its just your code from above:
<div class="span12" style="text-align:center">
<a href="mailto:partnerships#medicaldoctorapps.com">
<button class="btn btn-large btn-primary">Contact us to get started</button>
</a>
</div>
<div class="span12" style="text-align:center">
<button class="btn btn-large btn-primary">Contact us to get started</button>
</div>
Insead of Span use the default col classes of Bootstrap.
<div class="col-lg-12" style="text-align:center">
<button class="btn btn-large btn-primary">Contact us to get started</button>
</div>
In Bootstrap 4:
<div class="col-12 text-center">
<a class="btn btn-outline-primary" href="mailto:partnerships#medicaldoctorapps.com">Contact us to get started</a>
</div>
as Ken Koch said, you may have conflict. If you test with Google chrome right click the button, inspect element and select the "a" tag to see how it's affected by css
If you're using bootstrap just use <a class = "btn btn-large btn-primary">
And here's a fiddle that works for me.
http://jsfiddle.net/HAsPV/
To bring center the text, you can use col-md-offset-3 (number can be used according to the need it helps).
<button type="button" class="btn btn-default center-block">Centered Button</button>