Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make select child div with css?

I want to select the .aboutUsItem inside the #aboutUs. What did I do wrong ? This is my code:

#aboutUs .aboutUsItem {
    background-color: #e18686;
    padding: 30px;
    text-align: left;
    min-height: 362px;
    margin-top: 40px;
    border-radius: 65px 18px 65px 18px;
}
#aboutUsItems .container .row .col-md-3 >.aboutUsItem:nth-child(2) {
    border-radius: 0px;
}
<section id="aboutUs">
  <div class="container">
      <div class="row">
          <div class="col-md-3 col-lg-3">
              <div class="aboutUsItem redBg">
                      <p><i class="fa fa-check"></i></p>
                      <p><strong>7/24 Teknik Destek</strong></p>
                      <p>
                          Sadece Ticimax'ta olan 7/24
                          telefon ve ticket desteği ile
                          kesintisiz hizmet alın. Ticimax
                          Akademi'de her hafta ücretsiz
                          sınıf ve uygulamalı eğitimlerimize katılın.
                      </p>
              </div>
          </div>
          <div class="col-md-3 col-lg-3">
              <div class="aboutUsItem purpleBg">
                  <p><i class="fa fa-check"></i></p>
                  <p><strong>7/24 Teknik Destek</strong></p>
                  <p>
                      Sadece Ticimax'ta olan 7/24
                      telefon ve ticket desteği ile
                      kesintisiz hizmet alın. Ticimax
                      Akademi'de her hafta ücretsiz
                      sınıf ve uygulamalı eğitimlerimize katılın.
                  </p>
              </div>
          </div>
          <div class="col-md-3 col-lg-3">
              <div class="aboutUsItem greenBg">
                  <p><i class="fa fa-check"></i></p>
                  <p><strong>7/24 Teknik Destek</strong></p>
                  <p>
                      Sadece Ticimax'ta olan 7/24
                      telefon ve ticket desteği ile
                      kesintisiz hizmet alın. Ticimax
                      Akademi'de her hafta ücretsiz
                      sınıf ve uygulamalı eğitimlerimize katılın.
                  </p>
              </div>
          </div>
          <div class="col-md-3 col-lg-3">
              <div class="aboutUsItem orangeBg">
                  <p><i class="fa fa-check"></i></p>
                  <p><strong>7/24 Teknik Destek</strong></p>
                  <p>
                      Sadece Ticimax'ta olan 7/24
                      telefon ve ticket desteği ile
                      kesintisiz hizmet alın. Ticimax
                      Akademi'de her hafta ücretsiz
                      sınıf ve uygulamalı eğitimlerimize katılın.
                  </p>
              </div>
          </div>
      </div>
  </div>
</section>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You are making two mistakes :

  1. In your second css selection, it should be #aboutUs instead of #aboutUsItems.

  2. You would wanna select the second .col-md-3 and change its .aboutUsItem.

#aboutUs .aboutUsItem {
  background-color: #e18686;
  padding: 30px;
  text-align: left;
  min-height: 362px;
  margin-top: 40px;
  border-radius: 65px 18px 65px 18px;
}

#aboutUs .container .row .col-md-3:nth-child(2) .aboutUsItem {
  border-radius: 0px;
}
<section id="aboutUs">
  <div class="container">
    <div class="row">
      <div class="col-md-3 col-lg-3">
        <div class="aboutUsItem redBg">
          <p><i class="fa fa-check"></i></p>
          <p><strong>7/24 Teknik Destek</strong></p>
          <p>
            Sadece Ticimax'ta olan 7/24
            telefon ve ticket desteği ile
            kesintisiz hizmet alın. Ticimax
            Akademi'de her hafta ücretsiz
            sınıf ve uygulamalı eğitimlerimize katılın.
          </p>
        </div>
      </div>
      <div class="col-md-3 col-lg-3">
        <div class="aboutUsItem purpleBg">
          <p><i class="fa fa-check"></i></p>
          <p><strong>7/24 Teknik Destek</strong></p>
          <p>
            Sadece Ticimax'ta olan 7/24
            telefon ve ticket desteği ile
            kesintisiz hizmet alın. Ticimax
            Akademi'de her hafta ücretsiz
            sınıf ve uygulamalı eğitimlerimize katılın.
          </p>
        </div>
      </div>
      <div class="col-md-3 col-lg-3">
        <div class="aboutUsItem greenBg">
          <p><i class="fa fa-check"></i></p>
          <p><strong>7/24 Teknik Destek</strong></p>
          <p>
            Sadece Ticimax'ta olan 7/24
            telefon ve ticket desteği ile
            kesintisiz hizmet alın. Ticimax
            Akademi'de her hafta ücretsiz
            sınıf ve uygulamalı eğitimlerimize katılın.
          </p>
        </div>
      </div>
      <div class="col-md-3 col-lg-3">
        <div class="aboutUsItem orangeBg">
          <p><i class="fa fa-check"></i></p>
          <p><strong>7/24 Teknik Destek</strong></p>
          <p>
            Sadece Ticimax'ta olan 7/24
            telefon ve ticket desteği ile
            kesintisiz hizmet alın. Ticimax
            Akademi'de her hafta ücretsiz
            sınıf ve uygulamalı eğitimlerimize katılın.
          </p>
        </div>
      </div>
    </div>
  </div>
</section>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading