+ 2

can someone help me with this web code on html5

Create a BUTTON as a sibling to the data-credit-card DIV. Set the BUTTON's class to mdc-button and give it a data-pay-btn attribute. It should have Pay & Checkout Now as its display text. After the user enters details of the card and clicks on this button, the app will strike-though the card numbers to indicate that they are in-valid.

12th Jul 2019, 12:51 AM
Alex favour
Alex favour - avatar
10 Answers
+ 2
I suggest u start the code and post it with ur question, that way it's easier for me (us) to understand what u r trying to do. So when u have the code started, show me (us) and i (us) will see what we can do.
12th Jul 2019, 1:16 AM
Ginfio
Ginfio - avatar
+ 2
<html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie-edge" /> <title>Mini App</title> <style> body { margin: 0; padding: 1em; background: white; } [data-cart-info], [data-credit-card] { transform: scale(0.70); margin-left: -3.4em; } [data-cc-digits] input:focus, [data-cc-digits] input:focus { outline: none; } .mdc-card_primary-action, .mdc-card_primary-action:hover { cursor: auto; padding: 20px; min-width: inherit; } [data-credit-card][data-card-type] { transit: width 1.5s; margin-left: calc(100% - 130px); } .is-visa { background: linear-gradient(135deg, #622774 0%, #c53364 100%); } .is-mastercard {
12th Jul 2019, 1:21 AM
Alex favour
Alex favour - avatar
+ 2
Basically your problem is about changing the classes of a button giving it different functions to do
12th Jul 2019, 2:52 AM
Juan David Padilla Diaz
Juan David Padilla Diaz - avatar
+ 2
Can you post your code on playground
12th Jul 2019, 2:52 AM
Juan David Padilla Diaz
Juan David Padilla Diaz - avatar
+ 1
widows: auto; } input.is-invalid, .is-invalid input { text-decoration: line-through; } ::placeholder { color: #fff; } [data-cart-info] span{ display:inline-block; vertical-align:middle;} .material-icons { font: 150px; } [data-credit-card]{ background:#5d6874; min-height:240px; width:345px; border-radius:10px;} [data-card-type] img { width:120px; height:60px; display:block;} [data-cc-digits]{ margin-top:2em; border:0; } [data-cc-digits] input{ font: 2em; line-height:2em; margin-right:0.5em; } [data-cc-info]{ nargin-top:2em; border:0; background:none;
12th Jul 2019, 1:24 AM
Alex favour
Alex favour - avatar
+ 1
info] input { font:1.2em; color:white;} [data-cc-info] input:nth-child(2){ padding-right:10px; float:right;} [data-pay-btn]{ position:fixed; width:90%; border: solid 1px; bottom: 20px; } </style> </head> <body> <div data-cart-info=""> <h1 class="mdc-topography--headline4"> <span class="material-icons" content="shopping_cart"></span> <span data-bill=""></span> </h1> </div> <div data-credit-card="" class="mdc-card mdc-card--outlined"> <div class="mdc-card_primary-action"> <img src="http://placehold.it/120x60.png?text=card" alt="" d <div data-cc-digits=""> <input type="text" size="4" placeholder="----"> <input type="text" size="4" placeholder="----"> <input type="textata-card-type="">" size="4" placeholder="---
12th Jul 2019, 1:25 AM
Alex favour
Alex favour - avatar
+ 1
<div data-cc-info=""> <input type="text" size="20" placeholder="Name Surname"> <input type="text" size="6" placeholder="MM/YY"> </div> <input type="button" class="mdc-button" data-pay-btn="" value="Pay & Checkout Now"> </div> </div> <script> const xountries = [ {
12th Jul 2019, 1:26 AM
Alex favour
Alex favour - avatar
0
This is where i had problem with the checkout button
12th Jul 2019, 1:27 AM
Alex favour
Alex favour - avatar
0
Ok
17th Jul 2019, 10:57 AM
Alex favour
Alex favour - avatar
0
plz some one may give me a help about Creating a BUTTON as a sibling to the data-credit-card DIV. Set the BUTTON's class to mdc-button and give it a data-pay-btn attribute. It should have Pay Now as its display text. After the user enters details of the card and clicks on this button, the app will strike-though the card details that are in-valid, if any.
25th Aug 2019, 11:40 AM
David Mubangizi
David Mubangizi - avatar