Can someone assist me in fixing the CSS for this custom card within a modal box?
<!--Card-->
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<input type="text" id="market-search" onkeyup="marketSearch()" placeholder="Search for stock names..">
<i class="fa fa-times" data-dismiss="modal"></i>
</div>
<div class="modal-body">
<div class="container">
<div class="card stock-card" data-name="{{ stock.name }}">
<div class="card-body">
<h4 class="card-title">ABB India Ltd.</h4>
<div class="market-info">
<p class="card-text stock-info"><a target="_blank" href="https://www.google.com/finance?q=NSE:{{ stock.code }}">Details</a></p>
<p class="card-text stock-info up" id="diff"> 9.45
<i class="fa fa-arrow-up" aria-hidden="true"></i>
</p>
<p class="card-text stock-info"><strong>$</strong> <span id="price">1340</span></p>
<p class="card-text stock-info">ABB</p>
<input id="input_{{stock.code}}"/>
<a style="white-space:nowrap" href="#" class="btn btn-primary btn-success " onclick=insertRow("{{stock.code}}","{{stock.name|to_and}}","{{stock.price}}","{{stock.diff}}")>Buy</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
After rendering, the card appears as shown in the image below:
https://i.sstatic.net/kMBDJ.png
Utilizing CSS from Bootstrap, I have overridden various CSS classes. Here are the customizations I have made:
.card {
margin-top: 2rem;
}
.card .card-title {
font-weight: 300;
}
.card .market-info .card-text {
font-weight: 400;
}
.card .market-info .stock-info
{
display: block;
float: left;
padding: 0 1em;
text-align: right;
}
.card .market-info .up {
color: green;
}
.card .market-info .down {
color: red;
}
I aim to enhance the modal box and card design for a cleaner, more intuitive, and professional look.
Initially, I want to align the input box (reducing size and adding a placeholder for percentage value) and the buy button on the same line within the card.
The modal box should have a scrolling feature.
I am facing challenges in achieving this. Any assistance provided here would be greatly appreciated.
Access the codepen link here for reference: https://codepen.io/agrawalo/pen/NWKaWMm