0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Please help me to understand this CSS

  • Please help me to understand this CSS

    Posted 13 years 3 months ago
    • Hi all

      could you please help me to understand these CSS selectors:
      div.socialbuttons{
          width:100%
      } 
      div.socialbuttons div{
          float:left;
          margin-right:5px;
      } 

      What is the difference between "div.socialbuttons" and "div.socialbuttons div"? What is the purpose of the additional "div" in 2nd selector? Why not building a single selector?

      Sorry, I'm very CSS beginner :oops:
      Thank you
    • 13 years with RocketTheme and counting! :-)
      I'm a woman. This does not mean that I'm not able to distinguish a goat from a website and a shopping list from a css file.
      I design websites since 1996, right? Cheers :-)
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: Please help me to understand this CSS

    Posted 13 years 3 months ago
    • div.socialbuttons {..}
      This rule should style a div with the class="div.socialbuttons"
      <div class="socialbuttons">some code</div>

      div.socialbuttons div {...}
      This rule should style all div's that are inside a div with the class="div.socialbuttons"
      like
      <div class="socialbuttons">
      <div>some code</div>
      <div>some code</div>
      <div>some code</div>

      </div>
  • Re: Please help me to understand this CSS

    Posted 13 years 3 months ago
    • Henning wrote:
      <div class="div.socialbuttons">some code</div>

      Hello Hening!

      Why
      <div  class="div.socialbuttons">

      instead of
      <div  class="socialbuttons">
      ?
    • 13 years with RocketTheme and counting! :-)
      I'm a woman. This does not mean that I'm not able to distinguish a goat from a website and a shopping list from a css file.
      I design websites since 1996, right? Cheers :-)
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: Please help me to understand this CSS

    Posted 13 years 3 months ago
    • because I failed at copy&paste. :oops:
      Sorry ... changed that now ...
  • Re: Please help me to understand this CSS

    Posted 13 years 3 months ago
    • Henning wrote:
      because I failed at copy&paste. :oops:
      Sorry ... changed that now ...

      Thank you Henning.
      As usual, you helped me solve a great doubt! :cheesy:
      Cheers,
      Antonella
    • 13 years with RocketTheme and counting! :-)
      I'm a woman. This does not mean that I'm not able to distinguish a goat from a website and a shopping list from a css file.
      I design websites since 1996, right? Cheers :-)

Time to create page: 0.064 seconds