-3
\$\begingroup\$

I'm a software developer trying to level up my front end skills. I used to be quite decent at it but haven't worked with front end for a long time so my skills are a bit rusty. As an exercise I'm building out these W3 templates using vanilla HTML & CSS.

Please provide feedback based on these questions:

  • How would you rate this code in terms of cleanliness and maintainability?
  • How efficient is the structuring of the code? How to make it more efficient?

<html lang="en">

<head>
    <style>
        *,
        *:before,
        *:after {
            box-sizing: border-box;
        }

        :root {
          --default-bg-color: white;
          --default-border: 1px solid #c7c7c7;
          --default-filter: grayscale(75%);
          --default-font: normal 15px/150% Verdana, Arial, Helvetica, sans-serif;
        }

        body {
            font: var(--default-font);
            margin: 0;
        }

        .br-bar {
            width: 100%;
            overflow: hidden;
        }

        .br-border-light-grey,
        .br-hover-border-light-grey:hover,
        .br-border-light-gray,
        .br-hover-border-light-gray:hover {
            border-color: #f1f1f1 !important;
        }

        .br-btn-submit {
            background: #000;
            color: #fff;
            font: var(--default-font);
            width: 200px;
            padding: 14px;
            text-transform: uppercase;
        }

        .br-border-bottom {
            border-bottom: 1px solid #ccc !important;
        }

        .br-border-light-grey {
            border-color: #f1f1f1 !important;
        }

        .br-bw {
            background: #000;
            color: #fff;
        }          

        .br-card {
            background-size: cover;
            position: relative;
        }

        .br-container {
            padding: 0.01em 16px;
        }

        .br-content {
            margin-left: auto;
            margin-right: auto;
            position: relative;
        }

        .br-content img {
            width: 100%;
        }

        .br-custom-image {
            width: 99% !important;
        }

        .br-form {
            display: flex;
            flex-flow: column nowrap;
        }

        .br-form-field {
            background: transparent;
            border: 1px solid #c7c7c7;
            font: var(--default-font);
            margin-bottom: 16px;
            padding: 10px;
        }

        .br-grayscale {
            filter: var(--default-filter);
        }

        .br-image {
            height: auto;
            max-width: 100%;
            vertical-align: middle;
        }

        .br-margin-bottom {
            margin-bottom: 16px !important;
        }

        .br-padding {
            padding: 8px 16px !important;
        }

        .br-padding-16 {
            padding-top: 16px!important;
            padding-bottom: 16px!important;
        }

        .br-padding-32 {
            padding-top: 32px!important;
            padding-bottom: 32px!important;
        }

        .br-right {
            float: right !important;
        }

        .br-right a {
            padding: 12px;
            text-decoration: none;
        }

        .br-right a:hover {
            background: #333;
            color: white;
        }

        .br-row {
            display: flex;
        }

        .br-row > .card {
            width: 25%;
        }

        .br-row > .card img {
            background-size: contain;
            width: 100%;
        }

        .br-row button {
            background: #f3f3f3;
            border: none;
            width: 100%;
            height: 34px;
        }

        .br-row-padding {
            padding: 0 8px;
        }

        .br-section-header {
            font: normal 24px/150% Segoe UI, Arial, sans-serif;
            font-weight: 400;
            margin: 10px 0;
        }

        .br-text-centered {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .br-text-wide {
            letter-spacing: 2px;
        }

        .br-top {
            position: fixed;
            background: var(--default-bg-color);
            box-shadow: 1px 2px 10px #00000029, 2px 3px 5px #0000001f;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        .br-top a {
            color: black;
            font-size: 15px;
            line-height: 1.5;
            text-decoration: none;
        }

        .br-white,
        .br-white-hover {
            color: #000 !important;
            background: #fff !important;
        }

        /* Misc */

        .introText {
            color: #fff;
            font-size: 34px;
            position: absolute;
        }

        .introText span.logo {
            background: #333;
            opacity: .88;
            padding: 14px;
        }

        .text-block {
            padding: 0 20px 0 20px;
            position: absolute;
            top: 0;
        }

        .text-block p {
            font-size: 8px;
        }

        footer {
            padding: 20px;
            text-align: center;
            width: 100%;
        }

        footer a {
            color: #fff;
        }

        footer p {
            font-size: 14px;
        }

        @media screen and (max-width: 600px) {
            .br-row, .profiles {
                flex-direction: column;
            } 

            .gallery > .br-row img {
                100%;
            }   

            .home span:not(.logo) {
                display: none;
            }

            .navmenu {
                display: none;
            }

            .profiles > .br-card {
                width: 100%;
            }

            .text-block {
                display: none;
            }
        }

        @media screen and (max-width: 1024px) {
            .br-row {
                flex-flow: row wrap;
            }

            .br-row > .br-card {
                width: 50%;
            }
        }
    </style>
</head>

<body>
    <!-- Top menu -->
    <div class="br-top br-padding">
        <div class="br-bar br-padding-16 br-text-wide">
            <a href="#" class="br-bar-item"><b>BR</b> Architects</a>
            <nav class="navmenu br-right">
                <a href="#">Projects</a>
                <a href="#">About</a>
                <a href="#">Contact</a>
            </nav>
        </div>
    </div>

    <!-- Header -->
    <header class="br-content">
        <img src="https://www.w3schools.com/w3images/architect.jpg" alt="BR Building" class="br-image">
        <div class="home br-text-wide introText br-text-centered"><span class="logo">BR</span> <span>Architects</span></div>
    </header>

    <!-- Page content -->
    <div class="br-content br-padding">
        <div class="br-container br-padding-32">
            <h3 class="br-text-wide br-padding-16 br-border-bottom br-section-header br-border-light-grey">Projects</h3>
        </div>
        <div class="br-row br-row-padding">
            <div class="br-card br-margin-bottom">
                <img src="https://www.w3schools.com/w3images/house5.jpg" alt="Summer House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Summer House</p>
                </div>
            </div>
            <div class="br-card br-margin-bottom">
                <img src="https://www.w3schools.com/w3images/house2.jpg" alt="Brick House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Brick House</p>
                </div>
            </div>
            <div class="br-card br-margin-bottom">
                <img src="https://www.w3schools.com/w3images/house3.jpg" alt="Renovated House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Renovated</p>
                </div>
            </div>
            <div class="br-card">
                <img src="https://www.w3schools.com/w3images/house4.jpg" alt="Barn House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Barn House</p>
                </div>
            </div>
        </div>
        <div class="br-row br-row-padding">
            <div class="br-card br-margin-bottom">
                <img src="https://www.w3schools.com/w3images/house5.jpg" alt="Summer House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Summer House</p>
                </div>
            </div>
            <div class="br-card">
                <img src="https://www.w3schools.com/w3images/house2.jpg" alt="Brick House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Brick House</p>
                </div>
            </div>
            <div class="br-card">
                <img src="https://www.w3schools.com/w3images/house3.jpg" alt="Renovated House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Renovated</p>
                </div>
            </div>
            <div class="br-card">
                <img src="https://www.w3schools.com/w3images/house4.jpg" alt="Barn House" class="br-custom-image">
                <div class="text-block br-bw">
                    <p>Barn House</p>
                </div>
            </div>
        </div>
    </div>
    <div class="br-container br-padding-32">
        <h3 class="br-text-wide br-padding-16 br-border-bottom br-section-header br-border-light-grey">About</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
    <div class="br-row br-row-padding br-grayscale">
        <div class="br-card br-margin-bottom">
            <img src="https://www.w3schools.com/w3images/team2.jpg" alt="John Doe" class="br-image">
            <h4>John Doe</h4>
            <p>CEO & Founder</p>
            <p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>
            <button>Contact</button>
        </div>
        <div class="br-card br-margin-bottom">
            <img src="https://www.w3schools.com/w3images/team1.jpg" alt="Jane Doe" class="br-image">
            <h4>Jane Doe</h4>
            <p>Architect</p>
            <p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

            <button>Contact</button>
        </div>
        <div class="br-card br-margin-bottom">
            <img src="https://www.w3schools.com/w3images/team3.jpg" alt="Mike Ross" class="br-image">
            <h4>Mike Ross</h4>
            <p>Architect</p>
            <p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

            <button>Contact</button>
        </div>

        <div class="br-card br-margin-bottom">
            <img src="https://www.w3schools.com/w3images/team4.jpg" alt="Dan Star" class="br-image">
            <h4>Dan Star</h4>
            <p>Architect</p>
            <p>Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.</p>

            <button>Contact</button>
        </div>
    </div>
    <div class="br-container br-padding-32">
        <h3 class="br-text-wide br-padding-16 br-border-bottom br-section-header br-border-light-grey">Contact</h3>

        <p>Lets get in touch and talk about your next project.</p>
        <form class="br-form">
            <input type="text" placeholder="Name" class="br-form-field">
            <input type="text" placeholder="Email" class="br-form-field">
            <input type="text" placeholder="Subject" class="br-form-field">
            <input type="text" placeholder="Comment" class="br-form-field">
            <input type="submit" name="submit" value="Send Message" class="br-btn-submit">
        </form>
    </div>
    <div class="br-container">
        <img src="https://www.w3schools.com/w3images/map.jpg" alt="Map" class="br-image br-margin-bottom">
    </div>

    <footer class="br-bw">
        <p>Powered by <a href="https://www.w3schools.com/">w3.css</a></p>
    </footer>
</body>
\$\endgroup\$

closed as unclear what you're asking by πάντα ῥεῖ, Ludisposed, Graipher, Sᴀᴍ Onᴇᴌᴀ, IEatBagels Feb 12 at 19:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.