Display Transfers Button at the far right corner - html

<div class="account-tile" qa-name="accountBlock">
<a
*ngIf="link"
class="account-detail-header"
[routerLink]="'/AccountDetails/' + account.index!"
>
<div qa-name="accountName" class="account-name">
{{ account.accountName }}
</div>
<div qa-name="accountNumber" class="account-number">
...{{ account.number | lastFour }}
</div>
<span>
<i class="gg-chevron-right"></i>
</span>
</a>
<div *ngIf="!link" class="account-detail-header">
<div qa-name="accountName" class="account-name">
{{ account.accountName }}
</div>
<div qa-name="accountNumber" class="account-number">
...{{ account.number | lastFour }}
</div>
</div>
<div class="available-balance-container">
<div class="flex">
<span class="negative-account" *ngIf="account.availableBalance! < 0"
>-</span
>
<span
[ngClass]="link ? 'format-dollar-link' : 'format-dollar-display'"
class="format-dollar"
>
$
</span>
<h2 qa-name="availableBalance">
{{ account.availableBalance | currency: '':'' | absolute }}
</h2>
<!--This is wheere the transfer button appears-->
<div class="parent=class">
<button class="button-right pull-right">Transfer</button>
</div>
</div>
<h3>Available Balance</h3>
</div>
</div>
I am trying to display a transfer button at the right corner to look like the picture above. How can I accomplish that? I tried creating a button and a class that pulls the button to the right. when I compile the code, the transfer button shows underneath the Account amount

You can add position: absolute to your transfer button.
.parent-class {
position: relative;
height: 100px;
border: 1px solid red;
}
.button-right {
position: absolute;
right: 10px;
}
<div class="parent-class">
<button class="button-right">Transfer</button>
</div>

Related

Indicators and Paginator styling for PrimeNG Carousel

I have implemented a carousel using PrimeNG which looks like this
Notice the style of the carousel indicators and navigators. I want to have the default style of indicators/navigators for the carousel like this
I have added the imports for CarouselModule and ButtonModule in my module.ts file but it does not work. Is this possible using CSS or any other way?
PrimeNG Documentation - https://www.primefaces.org/primeng/carousel
My code:
app.component.html
<p-carousel
[value]="planDetails"
styleClass="custom-carousel"
[numVisible]="3"
[numScroll]="1"
[circular]="true"
[autoplayInterval]="3000"
>
<ng-template let-plan pTemplate="item">
<div class="centered-div">
<div class="plans">
<div class="card plan-card">
<div class="card-content">
<div class="plan-name">{{ plan?.planName }}</div>
<div class="plan-desc">
{{ plan?.description }}
</div>
<div class="plan-price">
<span class="plan-cost"
>$ {{ plan?.pricePerUser }}
<span>
<sup class="plan-currency">{{
plan?.currency
}}</sup>
</span></span
>
</div>
<div class="billing-way">per user billed annually</div>
<div class="plan-upgrade-btn">
<button
type="button"
class="remediator-blue-btn change-btn"
>
<span class="button-text" (click)="onUpgrade(plan)">
Select
</span>
</button>
</div>
<hr />
<div class="plan-features">Features</div>
<div class="plan-feature-1">
<img
src="assets/images/orange-check.svg"
alt=""
class="feature-check"
/>
<span class="feature-text"
>Daily search limit -
{{ plan.dailySearchLimit }}</span
>
</div>
<div class="plan-feature-1">
<img
src="assets/images/orange-check.svg"
alt=""
class="feature-check"
/>
<span class="feature-text"
>Maximum searches - {{ plan.maxSearches }}</span
>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</p-carousel>
</div>```
Please check that you have the primeng theme in angular.json file
can you upload the styles array from your angular.json file ?
add the theme to the styles array in angular.json
"node_modules/primeng/resources/themes/saga-blue/theme.css"
to edit the navigators icons with css you can use this:
::ng-deep .p-carousel .p-carousel-content .p-carousel-prev {
}
::ng-deep .p-carousel .p-carousel-content .p-carousel-next {
}

Showing a popup show what's behind

When I show a popup, the circle used for decoration show up, I don't know how solve that,
Here's the fiddle :
some code
https://jsfiddle.net/MagikMike/pctb9e0n/
Thanks
Give your circles IDs, in this case I added an ID circle0 and circle1 to both circles -
<div class="overlay" id="popup1"><div class="popup" id="popup"></div></div>
<div class="userMonitoringTarget">
<div class="circle1" id="circle0">
<div class="circle2">
<div class="circle3">
</div>
</div>
<div class="rectangle"></div>
</div>
<span class="dot"></span>
<div class="userMonitoring">
<div>
<span>
Date : 00/00/0000
</span>
<div>
<span>
LOREM IPSUM
</span>
</div>
</div>
<div class="userMonitoringAttachement">
<img src="/image/icon/icn-plus.svg" alt="+"
onclick="show_popup(' . $user->getNum() . ',' . $monitorings->id[$i] . ');return false;">
</div>
</div>
</div>
<div class="userMonitoringTarget">
<div id="circle1" class="circle1">
<div class="circle2">
<div class="circle3">
</div>
</div>
<div class="rectangle"></div>
</div>
<span class="dot"></span>
<div class="userMonitoring">
<div>
<span>
Date : 00/00/0000
</span>
<div>
<span>
LOREM IPSUM
</span>
</div>
</div>
<div class="userMonitoringAttachement">
<img src="/image/icon/icn-plus.svg" alt="+"
onclick="show_popup(' . $user->getNum() . ',' . $monitorings->id[$i] . ');return false;">
</div>
</div>
</div>
In your JS, your circles still showed because you didn't target them and set the visibility to hidden; now that we have IDs associated with the two circles you can properly get and set the visibility when the pop up is shown.
function hide_popup()
{
setTimeout(function()
{
document.getElementById('popup1').style.visibility = "hidden";
document.getElementById('popup1').style.opacity = 0;
document.getElementById('popup').innerHTML = "";
}, 100);
}
function show_popup( user, monitoring )
{
document.getElementById('circle0').style.visibility = "hidden";
document.getElementById('circle1').style.visibility = "hidden";
document.getElementById('popup1').style.visibility = "visible";
document.getElementById('popup1').style.opacity = 1;
}
You need to add a z-index for your popup wrapper like so.
#popup1 {
z-index: 999;
}

Why different language will influence html layout?

Here is my messageboard project, I don't know why the different will influence my css layout...
I just test english,chinese,thai they both work great, but only japanese will destroy my css style..
I use en_US,ja_JP,zh_TW,th_TH php file to change language
When use English
When use japanese
<li class="board_list">
<div class="board_img">
<img class="board_icon" src="./static/icon/board_icon.svg" alt="board icon">
</div>
<div class="board_text">
<div class="board_title">
<span>
<a href="./board.php?board_id=1">
<span>This was just test the title length of board name</span>
</a>
</span>
</div>
<div class="board_info">
<p class="p1">投稿:26</p>
</div>
</div>
<div class="board_latest">
<div class="board_latest_title">
<span>最新の投稿 :</span>
This was just test the title length of board name
</div>
<div class="board_latest_info">
<a href="./member.php?user=1" title="carry0987">
<span>carry0987,</span>
</a>
<span>2018-04-28</span>
</div>
</div>
</li>
<li class="board_list">
<div class="board_img">
<img class="board_icon" src="./static/icon/board_icon.svg" alt="board icon">
</div>
<div class="board_text">
<div class="board_title">
<span>
<a href="./board.php?board_id=2">
<span>Default</span>
</a>
</span>
</div>
<div class="board_info">
<p class="p1">投稿:6</p>
</div>
</div>
<div class="board_latest">
<div class="board_latest_title">
<span>最新の投稿 :</span>
This was just test the title length of board name
</div>
<div class="board_latest_info">
<a href="./member.php?user=2" title="carry0987y">
<span>carry0987y,</span>
</a>
<span>2018-04-28</span>
</div>
</div>
</li>
And this is my css code
.board_list {
border-width: 1px;
border-style: solid;
border-color: #E9E9E9;
}
You should add new div inside .board_list this class and add css property clear:both;
Something like this :
Also read this article : https://www.w3schools.com/cssref/pr_class_clear.asp

CSS position fixed moved childrens

I'm trying to create chat just like facebook or google. I have created chat-container class which holds users list and chat boxes.
chat-container is fixed with bottom:0 and right: 0, so its position is perfect.
.chat-container {
position: fixed;
bottom: 0;
right: 0;
padding: 5px;
}
The problem is that I am getting a lot of users from server. So, I would like to add max-height: value. When I add this property then all my chat-boxes include userslist is being misaligned.
Each chat box has class chat-box and and inside chat-body..chat-box
.chat-box {
display: inline-block;
max-width: 300px;
min-width: 100px;
}
.chat-body {
max-width: 500px;
min-width: 100px;
overflow-y: scroll;
max-height: 200px;
}
How can I solve that?
EDIT - HTML:
<div class="chat-container">
<div class="chat-box" *ngFor="let chat of openedChats; let first = first;">
<p-panel [toggleable]="true">
<p-header>
<a class="ui-panel-titlebar-icon ui-panel-titlebar-toggler ui-corner-all ui-state-default" (click)="onCloseChat(chat)">
<span class="fa fa-fw fa-close"></span>
</a>
<b>{{chat.recipient.name}}</b>
</p-header>
<div class="chat-body" #chatbody>
<div *ngFor="let message of chat.messages">
<!--TODO: Get current user id | change to ngClass-->
<div *ngIf="message.sender.id != loggedUserId" class="chat-inner-message">
{{message.message}}
</div>
<div *ngIf="message.sender.id == loggedUserId" class="chat-my-message">
{{message.message}}
</div>
</div>
</div>
<hr>
<input type="text" class="chat-input" (keyup.enter)="onSendMessage(messageInput, chat.recipient.id)" #messageInput>
<button pButton type="button" label="Send" (click)="onSendMessage(messageInput, chat.recipient.id)" style="width:100%"></button>
<!--<span *ngIf='first'>{{setChatInputFocus()}}</span>-->
</p-panel>
</div>
<div class="chat-box">
<p-panel [toggleable]="true" [collapsed]="true">
<p-header>
Chat
</p-header>
<ul class="ultima-menu">
<li *ngFor="let user of visibleUsers" (click)="onUserSelected($event, user.id)" style="padding: 3%">
<div style="display: inline; cursor: pointer;">
<div>
<img style="vertical-align:middle" src="{{user?.settings?.photoSrc}}" class="circular-portrait" width="30px" height="30px"
alt="{{user.name}}">
<span>
{{user.name}} {{user.surname}}
</span>
</div>
</div>
</li>
</ul>
<hr>
<input pInputText placeholder="Search" [ngModel]="userTypeaheadText" (ngModelChange)="userTypeahedChanged($event)">
</p-panel>
</div>
</div>

how to solve this css issue?

I am having some css issues...
When you hover over a product from here, you can see 'show now'..
But when you hover over the product from here, you can see 'Addto Cart' and you also see some black background for 'Add To Cart' which I am not understanding..
May I know what still I have to add in CSS..?
here is my code that displays products:
<!-- Product List -->
<div class="pl">
[product.each]
<div class="t1 col3">
<ul class="products ribbon">
<li class="product">
<a href="[product.link]">
<div class="thumbnail">
<img width="150" height="150" src="[product.image direct='1' tag='0']" class="attachment-shop_catalog wp-post-image" alt="[product.name]" title="[product.name]">
<div class="thumb-shadow"></div>
<strong class="below-thumb">[product.name]</strong>
</div>
<span class="price">
<span class="amount">
<?php if ($product->saleprice > 0 && $product->saleprice < $product->price) { ?>
<div class="prc">
<small>
<span style="text-decoration: line-through; color:blue;">[product.currency mode='sign'][product.price]</span>&nbsp&nbsp
<span style="font-weight: bold; color:red;">[product.currency mode='sign'][product.saleprice]</span>
</small>
</div>
<?php } else { ?>
<div class="prc">
<small>
<span style="font-weight: bold; color:blue;">[product.currency mode='sign'][product.price]</span>
</small>
</div>
<?php } ?>
</span>
</span>
</a>
<div class="buttons" style="opacity: 0; visibility: visible; overflow: hidden; height: 41px; ">
SHOP NOW
</div>
</li>
</ul>
</div> <!-- t1 col3 #end -->
[/product.each]
<div class="clearingdiv"> </div>
</div>
<!-- /Product List -->
so, please tell me what am I missing..? you can find CSS code in source code...
They have used a background image.
In your case you need to set a background to .buttons or the anchor in there.
BTW: please stop using inline-stylsheets; use a separate <style> block or an external CSS file instead. That way, your CSS is much easier to read and understand.