Skip to content

Instantly share code, notes, and snippets.

@gohilumesh
Last active January 21, 2017 07:38
Show Gist options
  • Save gohilumesh/ecdf01304f5d3edbb371f6b32ec9eda2 to your computer and use it in GitHub Desktop.
Save gohilumesh/ecdf01304f5d3edbb371f6b32ec9eda2 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="container">
<h1>Recreate this using HTML &amp; CSS</h1>
<img src="https://s3.amazonaws.com/f.cl.ly/items/2z3C3Z0L2Q0R282p1V0z/Image%202014-12-19%20at%2010.07.09%20AM.png" width="303" />
<!--Your HTML goes here-->
<h1>Recreate this using HTML &amp; CSS</h1>
<div class="m-container">
<p class="tooltip">
<strong>$167</strong> still needed for this project
<div class="tooltip-arrow-container">
<div class="arrow"></div>
</div>
</p>
<div class="w-container">
<progress max="100" value="70"></progress>
<p>
<strong class="orange">Only 3 days left</strong> to fund this project.
</p>
<p>
Join the 42 other donors who have already supported this project. Every dollar helps.
</p>
<div class="form-wrapper">
<form>
<input type="text" value="50">
</form>
<button class="p-btn">Give Now</button>
</div>
<div><a href="#" class="small-link">why give $50?</a></div>
</div>
<div class="btn-container">
<button>Save for later</button>
<button>Tell your friends</button>
</div>
</div>
</div>
</body>
</html>
/* Global resets */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "rooney-sans", Avenir-Book, Calibri, sans-serif;
color: #424242;
line-height: 1.4;
}
/* Fonts */
h1 {
font-family: "rooney-web", 'AmericanTypewriter', Rockwell, serif;
font-size: 2.5em;
font-weight: bold;
}
.container {
margin: 2em auto;
max-width: 630px;
text-align: center;
}
/* COLORS:
blue: #20A1D4;
green: #1CBC2C;
orange: #EF5F3C;
black: #424242;
grey: #777;
light grey: #eaeaea;
*/
.m-container {
width: 250px;
color: #eaeaea;
margin: 0;
padding: 0;
margin: 20px auto;
}
.tooltip {
background-color: #424242;
text-align: center;
padding: 10px 20px;
font-size: 12px;
font-weight: 500;
border-radius: 3px;
position: relative;
}
.tooltip-arrow-container {
position: relative;
left: 80%;
bottom: 5px;
margin-left: -5px;
}
.arrow {
width: 10px;
height: 10px;
display: block;
background-color: #424242;
transform: rotate(45deg);
}
.w-container {
border: 1px solid #eaeaea;
position: relative;
padding: 20px;
display: inline-block;
}
progress {
width: 100%;
-webkit-appearance: none;
appearance: none;
border: none;
height: 10px;
position: absolute;
top: 0;
left: 0;
right: 0;
}
progress[value]::-webkit-progress-bar {
background-color: #eaeaea;
;
border-radius: 2px;
}
progress::-webkit-progress-value {
background-color: #EF5F3C;
}
.orange {
color: #EF5F3C;
}
.w-container p {
font-size: 12px;
color: #777;
margin-top: 10px;
text-align: left;
}
.form-wrapper {
margin-top: 10px;
position: relative;
display: flex;
justify-content: space-between;
}
.form-wrapper:before {
content: '$';
position: absolute;
left: 5px;
top: 12px;
font-size: 1em;
color: #777;
font-weight: 900;
float: left;
}
.form-wrapper input[type=text] {
padding: 2px 15px;
width: 90px;
height: 45px;
font-size: 1em;
color: #424242;
font-weight: bold;
border: 1px solid #eaeaea;
}
.p-btn {
background: #1CBC2C;
color: white;
text-decoration: none;
padding: 10px 15px;
border-radius: 4px;
height: 45px;
letter-spacing: 1px;
font-weight: 800;
}
.small-link {
text-decoration: none;
float: left;
margin-top: 10px;
font-style: italic;
color: #20A1D4;
font-size: 0.8em;
}
.btn-container {
margin-top: 20px;
display: flex;
justify-content: space-between;
}
.btn-container button {
background: #fafafa;
color: #747474;
font-size: 0.7em;
font-weight: bold;
border: solid 1px;
border-color: #eaeaea;
border-radius: 2px;
text-decoration: none;
padding: 10px;
width: 45%;
box-shadow: 2px 2px 5px #eaeaea;
}
/* Your CSS goes here */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment