Changing font-weight to normal in h2 - html

I Want to change font-weight to normal of h2 element. I'm trying to do it by change it in parent directory.
h2 {
margin: 0;
padding: 0;
}
.top, .date {
display: inline-block;
width: 150px;
height: 30px;
border: 2px solid black;
text-align: center;
}
.date {
float: right;
font-size: 16px;
font-weight: normal;
}
<div id="instrument" class="top">
<h2>SP500</h2>
</div>
<div id="date" class="top date">
<h2>Data</h2>
</div>
<div class="date">
<h2>Czas Zamknięcia</h2>
</div>

I have no idea what you mean by parent directory, I guess you mean by selecting it with a parent tag/class/id, in that case, this is how you do it:
parent-tag h2 {
font-weight: normal;
}
or if you want to do it by parent class/id name like this
.className/#idName h2 {
font-weight: normal;
}

h2 {
margin: 0;
padding: 0;
}
.top, .date {
display: inline-block;
width: 150px;
height: 30px;
border: 2px solid black;
text-align: center;
}
.date {
font-size: 16px;
font-weight: normal;
}
.date>h2 {
font-size: 16px;
font-weight: normal !important;
}
<div id="instrument" class="top">
<h2>SP500</h2>
</div>
<div id="date" class="top date">
<h2>Data</h2>
</div>
<div class="date">
<h2>Czas Zamknięcia</h2>
</div>

Related

How to Place a vertical line between each image?

I would like to place a vertical line between each image, I have tried several things but without success.
Here is an idea of the final result. There is a vertical gray line between the two images.
How to create the vertical line?
.background-contact{
background-color: white;
width: 100%;
height: 190px;
position: absolute;
}
.logo5{
padding-top: -70px;
padding-left: 38px;
}
.title-contact-1{
font-family: 'Questrial', sans-serif;
font-size: 22px;
margin-top: -32px;
padding-left: 20px;
position: relative;
text-transform: uppercase;
font-weight: bold;
}
.text-contact-1{
font-family: 'Questrial', sans-serif;
font-size: 14px;
top: 22%;
left: -12%;
position: relative;
transform: translateX(-50%);
}
.logo6{
padding-top: 35px;
left: -80%;
}
<div class="background-contact">
<img class="logo5" src="https://i.ibb.co/0YyTszS/title-icon1.png" >
<span class="title-contact-1">Telephone</span>
<span class="text-contact-1">Just For VIP Member</span>
<img class="logo6" src="https://i.ibb.co/026Fs1B/title-icon2.png" >
<span class="title-contact-1">E-mail Us</span>
<span class="text-contact-1">admin#superbtc.biz</span>
</div>
I didn't do the pixel perfect but something like this:
.background-contact{
background-color: white;
width: 100%;
position: absolute;
display: flex;
}
.background-contact__block {
padding-bottom: 20px;
}
.background-contact__block + .background-contact__block {
margin-left: 50px;
padding-left: 20px;
border-left: 1px solid #ccc;
}
.title-contact-1{
font-family: 'Questrial', sans-serif;
font-size: 22px;
vertical-align: middle;
text-transform: uppercase;
font-weight: bold;
display: inline-block;
}
.text-contact-1{
font-family: 'Questrial', sans-serif;
font-size: 14px;
display: block;
}
.logo{
display: inline-block;
vertical-align: middle;
}
.background-contact__name {
padding-bottom: 30px;
}
<div class="background-contact">
<div class="background-contact__block">
<div class="background-contact__name">
<img class="logo" src="https://i.ibb.co/0YyTszS/title-icon1.png" >
<span class="title-contact-1">Telephone</span>
</div>
<span class="text-contact-1">Just For VIP Member</span>
</div>
<div class="background-contact__block">
<div class="background-contact__name">
<img class="logo" src="https://i.ibb.co/026Fs1B/title-icon2.png" >
<span class="title-contact-1">E-mail Us</span>
</div>
<span class="text-contact-1">admin#superbtc.biz</span>
</div>
</div>
to create a border you can use
border: (width) (style) (color);
This will make a border all around the element, to select one side you can use
border-left:
border-right:
border-top:
border-bottom:
But here your css is very strange, I recommend you to use the less as possible absolute positioning.
Here a better way do write that :
.contact-item {
width: 200px;
display: inline-block;
}
.contact-item img,
.contact-item h1 {
display: inline-block;
}
.border-left {
border-left: 2px solid #ddd;
padding-left: 1rem;
}
<div id="background-contact">
<div class="contact-item">
<img src="https://i.ibb.co/0YyTszS/title-icon1.png">
<h1>Telephone</h1>
<p>text<p>
</div>
<div class="contact-item border-left">
<img src="https://i.ibb.co/026Fs1B/title-icon2.png">
<h1>Email Us</h1>
<p>text</p>
</div>
</div>
you can also use :
element::last-child {
border-left: .. .. ..;
}

Unable to get what I need since I'm new to Flexbox

I'm trying to achieve simple layout structure with Flexbox. I'm referring Guide to Flexbox and learning on my own. Below is my code and what I'm trying to achieve.
.order-history-items {
.order-history-table {
ul {
margin: 0;
padding: 0;
}
li {
list-style-position: inside;
list-style-type: square;
}
.order-shipped-to,
.order-items,
.order-total-price {
width: 33%;
}
.toggle {
cursor: pointer;
display: block;
}
}
}
.js .order-history-table .hidden {
display: none;
}
.orderdetails {
display: flex;
flex-wrap: wrap;
// margin: 0 1%;
h1 {
flex-basis: 100%;
}
h2 {
clear: both;
flex-basis: 100%;
text-align: center;
margin-bottom: 20px;
}
.label {
font-weight: bold;
margin-bottom: .3rem;
margin-top: .3rem;
text-transform: uppercase;
}
.order-shipment-table {
background-color: white;
border: 1px solid ;
border-radius: 5px;
padding: 1em;
}
.order-shipment-details {
.order-shipment-address {
float: right;
}
}
.line-items {
clear: both;
padding-top: 1rem;
.line-item {
padding-bottom: 1rem;
.line-item-details,
.line-item-quantity,
.line-item-price {
display: inline-block;
vertical-align: top;
}
.line-item-quantity,
.line-item-price {
width: 14%;
}
.line-item-details {
width: 70%;
a {
font-size: 1.1rem;
}
}
.line-item-quantity {
text-align: center;
}
.line-item-price {
text-align: right;
}
}
}
flex-basis: 25%;
.order-payment-summary {
#media screen and (min-width: 480px) {
float: right;
}
.label {
font-weight: 800;
font-size: 15px;
margin-bottom: 12px;
}
.order-detail-summary {
.order-key {
text-transform: uppercase;
color: #000;
letter-spacing: 0;
font-size: 12px;
}
.order-value.number--smallest {
font-size: 12px;
font-weight: bold;
letter-spacing: 0px;
color: #000;
}
.order-value.number--large {
color: #000;
letter-spacing: 0;
}
}
}
.order-information {
flex-basis: 100%;
margin-bottom: 30px;
// padding-bottom: .5em;
// padding-top: .5em;
.order-status {
span {
color: #000;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
font-size: smaller;
}
}
.order-date {
span {
color: #000;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
font-size: smaller;
}
}
.label {
color: white;
font-weight: 300;
text-transform: none;
}
.value {
font-weight: 700;
}
.order-number {
font-size: 1.75rem;
}
}
.payment-amount {
.label {
font-weight: normal;
text-transform: none;
}
}
.order-totals-table td {
&:first-child {
padding-right: 5rem;
text-align: left;
}
}
.order-payment-instruments,
.order-billing,
.order-shipment-address
{
flex-basis: 25%;
.label {
font-weight: 800;
font-size: 15px;
}
}
.order-payment-instruments{
padding-left: 84px;
}
.order-billing {
padding-left: 100px;
}
.order-shipment-address
{
padding-left: 120px;
}
.order-shipments {
h2 {
display: flex;
}
}
}
<div class="orderdetails">
<h1>My Order</h1>
<h2 class="order-number">
<span class="label">Order :</span>
<span class="value">STG00004302</span>
</h2>
<div class="order-information">
<div class="order-status">
<span class="label">Order Status:</span>
<span class="value clearfix">Complete</span>
</div>
<div class="order-date">
<span class="label">Order Placed:</span>
<span class="value">10/27/2017 11:02:15 AM</span>
</div>
</div>
<div class="order-payment-summary">
<div class="label">Payment Total</div>
<div class="order-detail-summary">
<div class="order-totals-table">
<div class="order-subtotal order-row">
<div class="order-key">Subtotal</div>
<div class="order-value number--smallest">C$ 21.33</div>
</div>
<div class="order-shipping order-row">
<div class="order-key">
Shipping
</div>
<div class="order-value number--smallest">
C$ 0.00
</div>
</div>
<div class="order-sales-tax order-row">
<div class="order-key">Taxes</div>
<div class="order-value number--smallest">
C$ 2.77
</div>
</div>
<div class="order-total order-row">
<div class="order-key">Order Total:</div>
<div class="order-value number--large">C$ 24.10</div>
</div>
</div>
</div>
</div>
<div class="order-payment-instruments">
<div class="label">
Payment Method
</div>
<div class="payment-type">PayPal</div>
<div class="payment-amount">
<span class="label">Amount:</span>
<span class="value">C$ 24.10</span>
</div>
<!-- END: payment-amount -->
</div>
<div class="order-billing">
<div class="label">Billing Address</div>
<div class="mini-address-name">
Dhon Rocafort
</div>
<div class="mini-address-location">
<address>
1120 N St
<br>Sacramento,
CA
95814-5680<br>
United States
<br>
2122121423
</address>
</div>
</div>
<div class="order-shipment-address">
<div class="label">Shipping To</div>
<div class="mini-address-name">
DihonsKi Rocafort
</div>
<div class="mini-address-location">
<address>
Air Canada Centre
<br>40 Bay St
<br>Toronto,
ON
M5J 2X2<br>
Canada
<br>
2122121423
</address>
</div>
<div class="shipping-method">
<div class="label">Method:</div>
<div class="value">StandardCA</div>
</div>
</div>
</div>
It should look like this in desktop view :
I'm caring about the main 4 columns in the end of the image, it should be responsive too. I don't have any specifics for the mobile view, but those 4 columns should be 2*2 in mobile view.
NOTE: OPEN THE SNIPPET IN FULL PAGE.
Now, first off please try to add as minimal code as possible because it's way too hard to go through this long HTML, you could remove extra tags and labels since all you need to know is how to align using flex.
I just adjusted the alignments to match the screenshot you posted. I added all the CSS properties as inline styles with style attribute on the respective tags.
Everything you need about Flexboxes will be here https://css-tricks.com/snippets/css/a-guide-to-flexbox/. Try them out and you will get a hang of it very easily.
TIP Breakdown your webpage into components and wrap them in divs. It will be much easier to control alignments with this setup particularly with flexboxes.
html, body {
height: 100%;
}
.order-history-items {
.order-history-table {
ul {
margin: 0;
padding: 0;
}
li {
list-style-position: inside;
list-style-type: square;
}
.order-shipped-to,
.order-items,
.order-total-price {
width: 33%;
}
.toggle {
cursor: pointer;
display: block;
}
}
}
.js .order-history-table .hidden {
display: none;
}
.orderdetails {
display: flex;
flex-wrap: wrap;
// margin: 0 1%;
h1 {
flex-basis: 100%;
}
h2 {
clear: both;
flex-basis: 100%;
text-align: center;
margin-bottom: 20px;
}
.label {
font-weight: bold;
margin-bottom: .3rem;
margin-top: .3rem;
text-transform: uppercase;
}
.order-shipment-table {
background-color: white;
border: 1px solid ;
border-radius: 5px;
padding: 1em;
}
.order-shipment-details {
.order-shipment-address {
float: right;
}
}
.line-items {
clear: both;
padding-top: 1rem;
.line-item {
padding-bottom: 1rem;
.line-item-details,
.line-item-quantity,
.line-item-price {
display: inline-block;
vertical-align: top;
}
.line-item-quantity,
.line-item-price {
width: 14%;
}
.line-item-details {
width: 70%;
a {
font-size: 1.1rem;
}
}
.line-item-quantity {
text-align: center;
}
.line-item-price {
text-align: right;
}
}
}
flex-basis: 25%;
.order-payment-summary {
#media screen and (min-width: 480px) {
float: right;
}
.label {
font-weight: 800;
font-size: 15px;
margin-bottom: 12px;
}
.order-detail-summary {
.order-key {
text-transform: uppercase;
color: #000;
letter-spacing: 0;
font-size: 12px;
}
.order-value.number--smallest {
font-size: 12px;
font-weight: bold;
letter-spacing: 0px;
color: #000;
}
.order-value.number--large {
color: #000;
letter-spacing: 0;
}
}
}
.order-information {
flex-basis: 100%;
margin-bottom: 30px;
// padding-bottom: .5em;
// padding-top: .5em;
.order-status {
span {
color: #000;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
font-size: smaller;
}
}
.order-date {
span {
color: #000;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
font-size: smaller;
}
}
.label {
color: white;
font-weight: 300;
text-transform: none;
}
.value {
font-weight: 700;
}
.order-number {
font-size: 1.75rem;
}
}
.payment-amount {
.label {
font-weight: normal;
text-transform: none;
}
}
.order-totals-table td {
&:first-child {
padding-right: 5rem;
text-align: left;
}
}
.order-payment-instruments,
.order-billing,
.order-shipment-address
{
flex-basis: 25%;
.label {
font-weight: 800;
font-size: 15px;
}
}
.order-payment-instruments{
padding-left: 84px;
}
.order-billing {
padding-left: 100px;
}
.order-shipment-address
{
padding-left: 120px;
}
.order-shipments {
h2 {
display: flex;
}
}
}
<div class="orderdetails" style="display: flex; flex-direction: column; height: 50%">
<h1 style="margin: auto;">My Order</h1>
<h2 class="order-number" style="margin: auto;">
<span class="label">Order :</span>
<span class="value">STG00004302</span>
</h2>
<div class="order-information" style="margin: 10px;">
<div class="order-status">
<span class="label">Order Status:</span>
<span class="value clearfix">Complete</span>
</div>
<div class="order-date">
<span class="label">Order Placed:</span>
<span class="value">10/27/2017 11:02:15 AM</span>
</div>
</div>
<div style="display: flex; flex-direction: row; justify-content: space-around;">
<div class="order-payment-summary">
<div class="label">Payment Total</div>
<div class="order-detail-summary">
<div class="order-totals-table">
<div class="order-subtotal order-row">
<div class="order-key">Subtotal</div>
<div class="order-value number--smallest">C$ 21.33</div>
</div>
<div class="order-shipping order-row">
<div class="order-key">
Shipping
</div>
<div class="order-value number--smallest">
C$ 0.00
</div>
</div>
<div class="order-sales-tax order-row">
<div class="order-key">Taxes</div>
<div class="order-value number--smallest">
C$ 2.77
</div>
</div>
<div class="order-total order-row">
<div class="order-key">Order Total:</div>
<div class="order-value number--large">C$ 24.10</div>
</div>
</div>
</div>
</div>
<div class="order-payment-instruments">
<div class="label">
Payment Method
</div>
<div class="payment-type">PayPal</div>
<div class="payment-amount">
<span class="label">Amount:</span>
<span class="value">C$ 24.10</span>
</div>
<!-- END: payment-amount -->
</div>
<div class="order-billing">
<div class="label">Billing Address</div>
<div class="mini-address-name">
Dhon Rocafort
</div>
<div class="mini-address-location">
<address>
1120 N St
<br>Sacramento,
CA
95814-5680<br>
United States
<br>
2122121423
</address>
</div>
</div>
<div class="order-shipment-address">
<div class="label">Shipping To</div>
<div class="mini-address-name">
DihonsKi Rocafort
</div>
<div class="mini-address-location">
<address>
Air Canada Centre
<br>40 Bay St
<br>Toronto,
ON
M5J 2X2<br>
Canada
<br>
2122121423
</address>
</div>
<div class="shipping-method">
<div class="label">Method:</div>
<div class="value">StandardCA</div>
</div>
</div>
</div>
</div>
CHECK THIS CODEPEN
The code is cluttered, but I have used Flexbox for your Payment total and position:absolute to your class="order-value" and right:10px

Avoiding multiple rows when lining up content in grids

I currently have a grid showing products. Full screen there is 3 products and once the screen gets smaller it shows 4 products.
My issue is, some names of the products are longer then others. In this example, as the container gets smaller, the product name of the 2nd and 3rd item moves to a new line faster then the 1st does.
Ideally, I'd like the Price and the SHOP buttons to be even with one another when this happens.
The only way I can think about achieving this is to have 3 separate rows for the picture, name, and price/button. By doing this, it makes it kind of difficult for the 4th item to appear nicely without making completely separate containers for different window sizes and loading the images twice.
Does anyone have any ideas on how I can achieve this without making multiple rows for each item?
*, input, :before, :after {
box-sizing: border-box;
}
h2.product-header {
font-family: "Open Sans", sans-serif;
font-size: 23px;
color: #231f20;
letter-spacing: 3px;
text-align: center;
padding-bottom: 50px;
border-bottom: 2px solid #c2c1c5;
}
.row {
display: block;
font-size: 0;
}
.row .grid {
vertical-align: top;
display: inline-block;
font-size: 18px;
}
.grid.one-third {
width: 33.33%;
}
#index-new-arrivals {
font-family: "Open Sans", sans-serif;
padding: 75px 50px;
}
#index-new-arrivals .grid {
width: 33.33%;
}
#index-new-arrivals .grid.product {
margin: 75px 0 15px 0;
padding: 0 7%;
}
#index-new-arrivals .grid.product:last-child { display:none;}
#index-new-arrivals .grid.product > div {
padding-bottom: 150%;
position: relative;
}
#index-new-arrivals .grid.product > div > div {
position: absolute;
width: 100%;
height: 100%;
background-size: cover;
}
#index-new-arrivals .grid.product-name {
margin-bottom: 15px;
padding: 0 7%;
vertical-align: middle;
}
#index-new-arrivals .grid.product h3 {
font-size: 18px;
text-align: center;
margin-top: 25px;
text-transform: uppercase;
letter-spacing: 4px;
color: #231f20;
font-size: 19px;
}
#index-new-arrivals .grid.product p {
font-size: 18px;
text-align: center;
text-transform: uppercase;
letter-spacing: 4px;
color: #231f20;
font-size: 19px;
}
#index-new-arrivals .grid.product a {
font-size: 15px;
letter-spacing: 2px;
display: block;
background-color: #3e3e3f;
max-width: 230px;
width: 80%;
margin: 25px auto 100px auto;
padding: 15px 0;
text-align: center;
text-transform: uppercase;
color: #fff;
}
#media (max-width:880px) {
#index-new-arrivals .grid {
width: 50%;
}
#index-new-arrivals .grid.product:last-child { display:inline-block;}
}
<section id="index-new-arrivals">
<div class="row" style="border:1px solid blue;">
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9126_BROWN_1_500x.jpg?v=1509207888');"></div>
</div>
<h3>Convertible Belt Bag</h3>
<p>$50</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9113_BLACK_500x.jpg?v=1509207748');"></div>
</div>
<h3>Mini Quilted Backpack</h3>
<p>$54</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9155_IVORY_1_500x.jpg?v=1509207616');"></div>
</div>
<h3>Snake Mini Reversible Tote</h3>
<p>$50</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9155_IVORY_1_500x.jpg?v=1509207616');"></div>
</div>
<h3>Snake Mini Reversible Tote</h3>
<p>$50</p>
Shop
</div>
</div>
</section>
you can fix the name h3 element max-height and show dot after text is bigger then h3 using those css properties :
white-space: pre;
overflow: hidden !important;
text-overflow: ellipsis;
*, input, :before, :after {
box-sizing: border-box;
}
h2.product-header {
font-family: "Open Sans", sans-serif;
font-size: 23px;
color: #231f20;
letter-spacing: 3px;
text-align: center;
padding-bottom: 50px;
border-bottom: 2px solid #c2c1c5;
}
.row {
display: block;
font-size: 0;
}
.row .grid {
vertical-align: top;
display: inline-block;
font-size: 18px;
}
.grid.one-third {
width: 33.33%;
}
#index-new-arrivals {
font-family: "Open Sans", sans-serif;
padding: 75px 50px;
}
#index-new-arrivals .grid {
width: 33.33%;
}
#index-new-arrivals .grid.product {
margin: 75px 0 15px 0;
padding: 0 7%;
}
#index-new-arrivals .grid.product:last-child { display:none;}
#index-new-arrivals .grid.product > div {
padding-bottom: 150%;
position: relative;
}
#index-new-arrivals .grid.product > div > div {
position: absolute;
width: 100%;
height: 100%;
background-size: cover;
}
#index-new-arrivals .grid.product-name {
margin-bottom: 15px;
padding: 0 7%;
vertical-align: middle;
}
#index-new-arrivals .grid.product h3 {
font-size: 18px;
text-align: center;
margin-top: 25px;
text-transform: uppercase;
letter-spacing: 4px;
color: #231f20;
font-size: 19px;
white-space: pre;
overflow: hidden !important;
text-overflow: ellipsis;
}
#index-new-arrivals .grid.product p {
font-size: 18px;
text-align: center;
text-transform: uppercase;
letter-spacing: 4px;
color: #231f20;
font-size: 19px;
}
#index-new-arrivals .grid.product a {
font-size: 15px;
letter-spacing: 2px;
display: block;
background-color: #3e3e3f;
max-width: 230px;
width: 80%;
margin: 25px auto 100px auto;
padding: 15px 0;
text-align: center;
text-transform: uppercase;
color: #fff;
}
#media (max-width:880px) {
#index-new-arrivals .grid {
width: 50%;
}
#index-new-arrivals .grid.product:last-child { display:inline-block;}
}
<section id="index-new-arrivals">
<div class="row" style="border:1px solid blue;">
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9126_BROWN_1_500x.jpg?v=1509207888');"></div>
</div>
<h3>Convertible Belt Bag</h3>
<p>$50</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9113_BLACK_500x.jpg?v=1509207748');"></div>
</div>
<h3>Mini Quilted Backpack</h3>
<p>$54</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9155_IVORY_1_500x.jpg?v=1509207616');"></div>
</div>
<h3>Snake Mini Reversible Tote</h3>
<p>$50</p>
Shop
</div>
<div class="grid product" style="border:1px solid grey;">
<div>
<div style="background-image:url('//cdn.shopify.com/s/files/1/2497/8510/products/9155_IVORY_1_500x.jpg?v=1509207616');"></div>
</div>
<h3>Snake Mini Reversible Tote</h3>
<p>$50</p>
Shop
</div>
</div>
</section>

how to show two different font size ,2 different texts using html,css

1st text part has two lines. 2nd text line has only one line. Here, I attached the image:
How do I do this using css?
<td class="right-col">
<div>
<div>
<span>average<br>cost</span>
</div>
<div>
<span>$2,500</span>
</div>
</div>
</td>
Try to this way
define class on your div and some write css according to your design.
.mainDiv{
padding: 20px;
background: #fcfcfc;}
.left-text {
display: inline-block;
vertical-align: top;
text-align: right;
color: gray;
text-transform: uppercase;
font-size: 11px;
line-height: 13px;
}
.right-text {
display: inline-block;
vertical-align: top;
text-align: right;
color: gray;
text-transform: uppercase;
font-size: 23px;
margin-left: 5px;
}
<div class="mainDiv">
<div class="left-text">
<span>average<br>cost</span>
</div>
<div class="right-text">
<span>$2,500</span>
</div>
</div>
One of the many ways you can do this.
.container {
width: 200px;
background: #E0E0E0;
font-size: 0;
font-family: sans-serif, serif;
padding: 20px;
}
.column {
color: #757575;
font-size: 16px;
display: inline-block;
width: 50%;
padding: 10px;
box-sizing: border-box;
vertical-align: middle;
}
.txt-left {
text-align: left;
font-size: 24px;
}
.txt-right {
font-size: 12px;
text-align: right;
}
<div class="container">
<div class="column txt-right">
<span>AVERAGE<br>COST</span>
</div>
<div class=" column txt-left">
<span>$2,500</span>
</div>
</div>
.right-col div {
table-layout: fixed;
font-family: Arial, sans-serif;
text-transform: uppercase;
background: linear-gradient(to bottom, #f7f8f8 0%,#fbfbfb 56%,#f5f6f6 74%,#e8e9e9 100%);
line-height: 10px;
font-size: 10px;
color: #85929c;
display: table;
width: 200px;
}
.right-col div span {
vertical-align: top;
display: table-cell;
padding: 10px 3px;
}
.right-col .text {
text-align: right;
}
.right-col .amount {
line-height: 20px;
font-size: 18px;
}
<table class="table">
<tbody>
<tr>
<td class="right-col">
<div>
<span class="text">average<br>cost</span>
<span class="amount">$2,500</span>
</div>
</td>
</tr>
</tbody>
</table>

How to get same height in display:table-cell

I have 3 buttons and I want that to be of same height.Also I want that to be of same height in tab resolution as well.I want this to be achieved in css.
Can anyone please tell me how can i achieve that.
HTML:
<div class="content">
<p>It's easy to become a member. </p>
<p> Join today online </p>
<div class="btn-wrap">
<div class="row">
<div class="col">Find Nearest Agent</div>
<div class="col"><a href="" >Join Now</a></div>
<div class="col"><a href="" >Download the App</a> </div>
</div>
</div>
</div>
CSS:
.content {
width:75%; //there is a reason to use 75% here coz I have to place an image for remaining 25%.
}
.btn-wrap {
display:table;
border-collapse: separate;
width:100%;
overflow: hidden;
}
.row {
display:table-row;
}
.col {
display:table-cell;
padding: 0 0.5% 0;
width:32%;
float: left;
}
a {
font-size: 20px;
}
input[type="submit"], a {
border: 0 none;
box-sizing: border-box;
display: block;
font-family: "Lato",Arial,sans-serif;
font-size: 17px;
font-style: normal;
font-weight: 900;
margin: 0;
padding: 20px 10px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
background-color: #ff0;
color: #1d6221
}
JSFiddle:http://jsfiddle.net/qwdduc7z/5/
Add height: 75px; to input[type="submit"], a{. eg. here
HTML
<div class="content">
<p>Easy to become number</p>
<p>Join Now </p>
<div class="btn-wcircle-wrap">
<div class="row">
Find Nearest Agent
Join Now
Download the App
</div>
</div>
</div>
CSS
.content {
width:75%;
}
.btn-wcircle-wrap {
display: table;
height: 100px;
}
.row {
display: table-row;
}
.col {
display: table-cell;
padding: 0 0.5%;
width: 32%;
}
a {
border: none;
box-sizing: border-box;
text-align: center;
vertical-align: middle;
font-family: "Lato",Arial,sans-serif;
font-size: 17px;
line-height: 1.5;
font-style: normal;
font-weight: 900;
text-decoration: none;
text-transform: uppercase;
background-color: #ff0;
color: #1d6221;
}
"to mimic the original example"
.content
{
width:75%;
}
.btn-wcircle-wrap {
display:table;
width:100%;
}
.row {
display:table-row;
}
.col {
display:table-cell;
padding: 20px 0.5%;
width:32%;
text-align: center;
background-color: #ff0;
box-shadow: 5px 0 0 0 white inset;
// or use
// border: 5px solid white;
}
a {
box-sizing: border-box;
vertical-align: text-top;
font-family: "Lato",Arial,sans-serif;
font-size: 17px;
line-height: 1.5;
font-style: normal;
font-weight: 900;
text-decoration: none;
text-transform: uppercase;
color: #1d6221;
}
http://jsfiddle.net/tksek87m/