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.

CSS Elements - Explanations Please

  • CSS Elements - Explanations Please

    Posted 13 years 7 months ago
    • Hi Rocketeers

      I am not a programmer and therefore this to you experts may seem a rather basic question to ask, but can somebody explain (or point me to an online tutorial) which explains how the CSS elemens are grouped together in the style sheets?

      Let me explain a bit more -

      sometimes elements are seperated with spaces and sometimes they are seperated with commas

      eg: H1 H2 H3 {color:#000 } or H1, H2, H3 {color:#000 }

      The reason I am having dificuly with this is that I have used some CSS from this site http://net.tutsplus.com/articles/news/create-a-sticky-note-effect-in-5-easy-steps-with-css3-and-html5/ and am getting some weird results that are affecting other elements on the page - namely the menus - which is I assume because they are List Items and the styling to the list are over riding other parts of the style sheet.

      I have wrapped my code in a Div called "stickynote" and applied it to my code - but am still getting errors - I think this is down to my not understanding how CSS elements cascade or Inherit properly and how elements are grouped and styled together as per my example above.

      Any help gratefully received.
      Dave

      PS - sorry I can give a link to my website - but I am tooling around with this on a local server.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: CSS Elements - Explanations Please

    Posted 13 years 7 months ago
    • www.w3schools.com/css/ is a good site.
      A good cheat sheet: www.addedbytes.com/cheat-sheets/css-cheat-sheet/
      Handy when you start learning things

      H1 H2 H3 {color:#000 }
      means:
      Take all H3s that are wrapped in a H2 wich is wrapped in a H2 an give them a color #000:

      This would be the html for that
      <h1><h2><h3>Some text</h3></h2></h1>
      (btw. a rather useless combination)

      H1, H2, H3 {color:#000 }
      is the same as
      H1 {color:#000 }
      H2 {color:#000 }
      H3 {color:#000 }

      Btw.: 99% of what I know about CSS I learned from posts here in the forum.
  • Re: CSS Elements - Explanations Please

    Posted 13 years 7 months ago
    • Thanks Henning

      W3Schools is great - I had tried there but hadn't found an explanation.

      Thank you also for the link to the Cheat Sheet - this is fantastic.

      Your explanation is perfectly clear - I think I understand this now.

      Now to crack the rest of CSS!!!

      Thanks Again
      Dave
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: CSS Elements - Explanations Please

    Posted 13 years 7 months ago
    • Here are some topics you need to look for.

      What is the difference between block and inline elements?
      How to turn an inline element into a block element?
      What means to "float" something?
      Why do you need to clear a "float"?
      How do I clear a "float"?
      What is the css-box-model?
      What are the differences between margin and padding?
      When is it useful to use negative margins?
      What are css-"Image Replacement Techniques "?
      What is css-specificity?
      How to trigger a "Block Formatting Context" and what the hell is that?

      Cross bowser stuff:
      What is the hasLayout-concept in IE<8?

      When you know the answers you have mastered CSS ...

Time to create page: 0.060 seconds