Vertically centering text in a div

0 votes

I'm trying to vertically center the text inside the 4 divs with sat, bit, mBTC, and BTC in them. I tried doing

display:table-cell;
vertical-align:middle;

But it does not work. Any idea how I can do this?

Sep 3, 2018 in Blockchain by slayer
• 29,040 points
35 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try this code:

.smallUnitBox {
    background-color: #29b8ff;
    border-right: 2px solid #2098d4;
    float: left;
    height: 36px;
    width: 96px;
    line-height: 36px;
    color: white;
    font-size: 28px;
    font-family: sans-serif;
    border-bottom: 1px solid #2098d4;
}

<div class="unitBox">
  <div class="smallUnitBox">sat</div>
  <div class="smallUnitBox">bit</div>
  <div class="smallUnitBox">mBTC</div>
  <div class="smallUnitBox">BTC</div>
</div>

Don't forget to remove as it's not needed:

display:table-cell;
vertical-align:middle;
answered Sep 3, 2018 by digger
• 27,620 points

Related Questions In Blockchain

0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 57 views
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
341 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
43 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
63 views
0 votes
1 answer
0 votes
1 answer

How can I take the required info and send it to a div in the html page?

window.onload=function(){ var anima = document.getElementById("crypto"); var ret = document.getElementById("btn"); ret.addEventListener("click",function(){ var ...READ MORE

answered Sep 6, 2018 in Blockchain by digger
• 27,620 points
23 views
0 votes
1 answer

How to create a Genesis Block in a Private Network?

{     "nonce": "0x0000000000000042",     "difficulty": "0x000000100",     "alloc": {     },     "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",     "coinbase": "0x0000000000000000000000000000000000000000",     "timestamp": "0x00",     "parentHash": ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 27,620 points
61 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.