Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Aurelian Spodarec
Aurelian Spodarec
10,801 Points

How would you do this?

HI,

How would you refactor this code with BEM and SMACSS?

    <!-- MY OFFERS
    ================================================== -->
    <section class="l-section l-section--special" id="services-section">

        <h2 class="highlighted header-alternative text-center">
            <span>MOJA OFERTA</span>
        </h2>

        <div class="l-grid-fluid">

            <div class="col-np xs-1 small-1 medium-1 large-3-5">

            <div class="m-offer--primary"> 
            <div class="m-offer--equal-height">
                <a href="" class="overlay-link"></a>
                <i class="fa fa-desktop" aria-hidden="true"></i>
                <h2 class="header-special">Front-end development</h2>
                <div class="m-offer__content">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                tempor incididunt ut labore et dolore magna aliqua. Ut 
                </div>
                <p>
                    <a href="">Find out more</a>
                </p>
            </div>
            </div><!-- /m-offer-primary -->

            </div><!-- /col -->


            <div class="col-np xs-1 small-1 medium-1 large-2-5">

            <div class="m-offer--secondary">
            <div class="m-offer--equal-height">

                <div class="l-grid-fluid">

                    <div class="col-np all-1">

                        <div class="wrap">
                             <a href="" class="overlay-link"></a>
                            <i class="fa fa-desktop" aria-hidden="true"></i>
                            <h2 class="header-special">Front-end development</h2>
                            <div class="m-offer__content">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua. Ut 
                            </div>
                            <p>
                            <a href="">Find out more</a>
                            </p>
                        </div>

                    </div><!-- /col -->

                    <div class="col-np all-1">

                        <div class="wrap">
                            <a href="" class="overlay-link"></a>
                            <i class="fa fa-desktop" aria-hidden="true"></i>
                            <h2 class="header-special">Front-end development</h2>
                            <div class="m-offer__content">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                            tempor incididunt ut labore et dolore magna aliqua. Ut 
                            </div>
                            <p>
                                <a href="">Find out more</a>
                            </p>
                        </div>

                    </div><!-- /col -->

                </div><!-- /l-grid -->

            </div>
            </div><!-- m-offer-secondary -->

            </div><!-- /col -->

        </div><!-- /l-grid-fluid -->

    </section>

This is Home page, and would the styels go in folder-> pages->home->home.scss ?

Aurelian Spodarec
Aurelian Spodarec
10,801 Points

I put that in modules, in page-headers, as I'm going to have this on other pages, but they will be the same, apart form thsi one.