Slide 1

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae, et?

Slide 1

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae, et?

Slide 1

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae, et?

Why did my Emmet nested elements shortcut attempt not work correctly?

23 Views Asked by At
<div id="slider">
        <div class="slide">
            <div class="content">
                <h1>Slide 1</h1>
                <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quae, et?          
                </p>
            </div>
        </div>
</div>

I wanted four instances of the above.

I tried #slider>.slide>.content>h1{Slide $}+p{lorem10}*4 but what I got was

<div id="slider">
            <div class="slide">
                <div class="content">
                    <h1>Slide 1</h1>
                    <p>lorem10</p>
                    <p>lorem10</p>
                    <p>lorem10</p>
                    <p>lorem10</p>
                </div>
            </div>
</div>

The lorem10 shortcuts didn't work and I received four p tags within my .content div instead of four repeated instances of the entire command. I figured that would happen, so I tried closing the command within parentheses (#slider>.slide>.content>h1{Slide $}+p{lorem10})*4 but that didn't work either.

What's the syntax to repeat an entire command multiple times? Also, why did the lorem shortcut not work regardless?

1

There are 1 best solutions below

0
Sergey Chikuyonok On

The correct syntax is p*4>lorem10