Nice to C(SS) you!

 Nice to C(SS) you!

Why do I love CSS so much? I don't know, I just love it, I just love it!!

I can't explain it - I just love it so so much!

It just makes so much sense to me - like so much of coding does! I just love how you can change the colours, how you can change the images, how you can change the sizes - it just makes so much more sense! 

I can't wait til I can start adding lots of random shadows to images.

What have I learned from CSS so far? 💓

Selectors

There are a few different types of selectors.

  • The 'type' selector (literally)
    • This one directly refers to the element of HTML you want to programme - e.g. this might be the <p> tag to style all your paragraphs
    • This can be referred to by 2 other names
      • The tag name selector
      • The element selector
    • The general format for this is 
      selector {
        declaration
      }
  • The 'universal' selector
    • '*'
    • *{
      declaration
      }
  • The 'class' selector
    • To do this, it seems that a 'class' attribute must be created in the HTML code (?!)
    • A 'full stop' (or 'period' to my wonderful American friends) must be used in the CSS when describing the class (?! - or 'calling' it ?! - sorry, I am just still a bit confused here (on all the terminology??!).
    • In the example given in the course, using a  'class' selector overrides a 'type' selector 🤔
  • You can add multiple classes to an HTML element (wow, wow, wow, wow)
    • You just have to create a space in between them
  • Select by 'ID'
    • This applies only to a very specific section
    • This is similar to how the ID attribute is used internally within HTML
    • You assign it "ID" as usual ( id="" )
    • You then use the # to call it again just like you do in the HTML
      • #id {
          declaration
        }

Three Final Thoughts

  1. Rosana told me off for pushing myself too hard and so I have been listening to them and trying to take it a bit more easy.
  2. I have learned something big about coding today: It is better to first solve the coding problem, and then to implement the code. But then if that is so wonderful, then why doesn't everybody do that?
  3. My favourite song to listen to, and to code to, and the song that inspires me on my Software Engineering journey is Yosemite by Lana del Rey. So here's a picture of Yosemite! What's your favourite song? Happy coding!!!


Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing