Hi! I have some difficulties with adding a space after every 4 characters to card number in real time.
dannebrob
@dannebrobAll comments
- @BekEsalySubmitted about 2 years ago@dannebrobPosted about 2 years ago
Hi @BekEsaly, nice to see your solution to the challenge. I saw your question about adding spaces on the front of the credit card. I found that this function worked for me, give it a try π
function injectSpaces(str) { let groupsOf4 = []; for (let start = 0; start < str.length; start += 4) { let group = str.slice(start, start + 4); groupsOf4.push(group); } return groupsOf4.join(" "); }
Marked as helpful0 - @YevgeniyMakkaveevSubmitted over 3 years ago
Well thats first time i try to do the responsive design. Don't know if the solutions there are optimal, so be glad to hear how it should be done.
@dannebrobPosted over 3 years agoHi, nice looking solution!
I noticed that if I view your page on smaller screens than 400px the layout don't work. What I tend to do myself is write the css to work on either mobile or on desktop first. And then use the @media at-rule just for the specific changes needed. So in this case I might have writen the css for the mobile view first and then writen the changes needed to work on lager screens in a media queries. Maybe this link will help you? https://www.w3schools.com/css/css_rwd_mediaqueries.asp
I was also thinking that you repeted the same css alot on some places (like on .gallery-back-img1/ and main-text-row-img1/). You might find it more efficent to write like explained on stack overflow: https://stackoverflow.com/questions/15374830/stop-repetition-of-css-code
Other than that, I like it.
I hope my sugestions will be useful to you.
Keep up the good work! πͺ
See you on the coding trail π
Marked as helpful2 - @rule-kellsSubmitted over 3 years ago
Any feedback is much appreciated. Critiques are welcomed; anything I could have done differently, have done better or any improvements to my code that you see.
@dannebrobPosted over 3 years agoReally nice work! You might want to wrap all the content in a main element and put the .Attribution in a footer element.
Beside from that I think it looks great!
0 - @Shekharpawar1Submitted over 3 years ago
I can't add the cover color on the image . can anyone help me
@dannebrobPosted over 3 years agoHave you tried to put the image in another div with a solid background color and change the opacity of the img?
Marked as helpful0