Created
November 7, 2018 14:01
-
-
Save ahmeturganci/9b9de26501a7f35ff0799e00336a18a1 to your computer and use it in GitHub Desktop.
Card-Example-Css-Html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Card Example With Flex Css</title> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <img src="https://s3.amazonaws.com/f.cl.ly/items/2z3C3Z0L2Q0R282p1V0z/Image%202014-12-19%20at%2010.07.09%20AM.png" | |
| width="300" /> | |
| </div> | |
| <div class="cardContainer"> | |
| <div class="cardTitle"> | |
| <p class="cardTitleText"><span class="price">$167</span> still needed for this project</p> | |
| </div> | |
| <div class="cardContent"> | |
| <div class="cardContentProgress"> | |
| <div class="progressPersun"></div> | |
| </div> | |
| <div class="cardBody"> | |
| <div class="text"> | |
| <p class="cardp"><span class="orangeSpan">Only 3 days left </span> to fund this project</p> | |
| <p class="cardp">Lorem inpus sit amed Lorem inpus sit amed Lorem inpus sit amed Lorem inpus sit | |
| amed </p> | |
| </div> | |
| <div class="cardInputArea"> | |
| <input type="text" placeholder:"$" class="bodyInput"> <button class="btnGreen"> Give Now</button> | |
| </div> | |
| <a href="#" class="link">Wht give $50?</a> | |
| </div> | |
| </div> | |
| <div class="cardFooter"> | |
| <button class="btnFooter">Save for later</button> | |
| <button class="btnFooter">Tell your friends</button> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| font-family: "Noto Sans", "Helvetica Neue", "Segoe UI", Helvetica, Verdana, Arial, sans-serif; | |
| } | |
| .container{ | |
| margin: 2em auto; | |
| max-width: 300px; | |
| } | |
| .cardContainer { | |
| display: flex; | |
| flex-direction: column; | |
| margin: 2em auto; | |
| max-width: 300px; | |
| } | |
| .cardTitle { | |
| background-color: #424242; | |
| border-radius: 0.3rem; | |
| margin-bottom: 0.6rem; | |
| } | |
| .price { | |
| font-weight: bold; | |
| } | |
| .cardTitleText { | |
| color: white; | |
| text-align: center; | |
| } | |
| .cardTitle:after { | |
| content: ''; | |
| right: 800px; | |
| position: absolute; | |
| border-style: solid; | |
| border-top-width: 8px; | |
| border-right-width: 5px; | |
| border-left-width: 5px; | |
| border-top-color: #424242; | |
| border-right-color: transparent; | |
| border-bottom-color: transparent; | |
| border-left-color: transparent; | |
| } | |
| .cardContent { | |
| border: 1px solid #eaeaea; | |
| } | |
| .cardContentProgress { | |
| border-bottom: 0.01rem solid #eaeaea; | |
| height: 0.75rem; | |
| } | |
| .progressPersun { | |
| border-width: 100%; | |
| height: 0.75rem; | |
| background-color: #EF5F3C; | |
| width: 75%; | |
| } | |
| .cardBody { | |
| padding: 1rem; | |
| color: #777; | |
| } | |
| .orangeSpan { | |
| color: #EF5F3C; | |
| font-weight: bold; | |
| } | |
| .cardInputArea { | |
| display: flex; | |
| justify-content: space-between; | |
| margin-top: 1rem; | |
| } | |
| .bodyInput { | |
| height: 2.5rem; | |
| width: 45%; | |
| border-radius: 0.3rem; | |
| border: 1px solid #eaeaea; | |
| font-size: 1.5rem; | |
| color: #424242; | |
| font-weight: bold; | |
| } | |
| .btnGreen { | |
| padding: 1rem; | |
| color: white; | |
| border: none; | |
| border-radius: 0.3rem; | |
| font-size: 1rem; | |
| font-weight: bold; | |
| background-color: #1CBC2C; | |
| } | |
| .cardFooter { | |
| display: flex; | |
| justify-content: space-between; | |
| margin-top: 1rem; | |
| } | |
| .link { | |
| color: #20A1D4; | |
| text-decoration: none; | |
| font-style: italic; | |
| font-size: 14px; | |
| } | |
| .btnFooter { | |
| border: 2px solid #eaeaea; | |
| width: 45%; | |
| padding: 0.7rem; | |
| color: #777; | |
| font-weight: bold; | |
| border-radius: 0.3rem; | |
| font-size: 0.8rem; | |
| justify-content: flex-end; | |
| background-color: #fafafa; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment