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 progress bar */ .pcp-progress-bar-container { width: 100%; height: 10px; background-color: #e5e7eb; border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; } .pcp-progress-bar-fill { height: 100%; background-color: var(--progress-bar-color); border-radius: 10px; transition: width 0.5s ease-in-out; } /* 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" aria-labelledby="pcp-title"> <header class="pcp-header"> <h3 class="pcp-title" id="pcp-title">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> <!-- This progress bar is made accessible with ARIA attributes. To change the progress, update 'aria-valuenow' and the inline style width on '.pcp-progress-bar-fill'. --> <div class="pcp-progress-bar-container" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" aria-labelledby="pcp-title"> <div class="pcp-progress-bar-fill" style="width: 80%;"></div> </div> <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>