Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- Place the following CSS in your <head> or stylesheet --> <style> /* This is an optional body style to provide a background for the page */ body { background-color: #f3f4f6; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; } /* Optional: a container to center the card on the page for demonstration */ .demo-container-progress { display: flex; justify-content: center; padding: 2rem; } /* === Profile Completion Progress Card Styles === */ .pcp-card { --pcp-card-radius: 12px; --pcp-card-shadow: 0 4px 10px rgba(0,0,0,0.06); --progress-bar-color: #4f46e5; /* Indigo */ background-color: #ffffff; border-radius: var(--pcp-card-radius); box-shadow: var(--pcp-card-shadow); max-width: 400px; width: 100%; padding: 1.5rem; } .pcp-header { margin-bottom: 1rem; } .pcp-title { font-size: 1.125rem; font-weight: 600; margin: 0; } /* Status text line (e.g., 75% Complete) */ .pcp-status { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; } .pcp-status-text { font-size: 0.875rem; color: #6b7280; } .pcp-status-percentage { font-size: 0.9rem; font-weight: 500; color: var(--progress-bar-color); } /* The native progress bar */ .pcp-progress-bar { width: 100%; height: 10px; margin-bottom: 1.5rem; appearance: none; } /* Styling for Webkit browsers (Chrome, Safari) */ .pcp-progress-bar::-webkit-progress-bar { background-color: #e5e7eb; border-radius: 10px; } .pcp-progress-bar::-webkit-progress-value { background-color: var(--progress-bar-color); border-radius: 10px; } /* Styling for Firefox */ .pcp-progress-bar { background-color: #e5e7eb; border: none; border-radius: 10px; } .pcp-progress-bar::-moz-progress-bar { background-color: var(--progress-bar-color); border-radius: 10px; } /* Call to action */ .pcp-footer { border-top: 1px solid #f3f4f6; padding-top: 1.25rem; } .pcp-cta-text { font-size: 0.95rem; color: #374151; margin: 0 0 0.75rem; } .pcp-cta-text strong { font-weight: 600; } .pcp-cta-link { display: inline-block; color: #ffffff; background-color: #1f2937; font-weight: 500; font-size: 0.9rem; padding: 0.5rem 1rem; border-radius: 8px; text-decoration: none; transition: background-color 0.2s ease; } .pcp-cta-link:hover { background-color: #374151; } </style> <!-- Place the following HTML in your <body> --> <div class="demo-container-progress"> <section class="pcp-card"> <header class="pcp-header"> <h3 class="pcp-title" id="pcp-label">Profile Completion</h3> </header> <div class="pcp-status"> <span class="pcp-status-text">4 of 5 steps complete</span> <span class="pcp-status-percentage">80%</span> </div> <!-- To change the progress, update the 'value' attribute below. --> <progress class="pcp-progress-bar" id="profile-progress" max="100" value="80" aria-labelledby="pcp-label"> 80% </progress> <footer class="pcp-footer"> <p class="pcp-cta-text"><strong>Next step:</strong> Add your company logo.</p> <a href="#" class="pcp-cta-link">Upload Logo</a> </footer> </section> </div>