Day 91 of writing every day.
Yesterday, I had a programming lesson after a full week of work and zero time to review. Fortunately I remembered where I left off a week ago and was able to pick things up right away. However, I felt that some parts of the practice website that I had been building with resources already provided by the course required more review and practice before I can say I’ve got a solid grasp of the concept.
There’s no better way to become a programmer than to move beyond practice and start creating; mistakes will be made along the way and true mastery will come from experience.
HTML and CSS work as one and with the internet browsers being accessed from a variety of devices of differing sizes, the idea of a one size fits all resolution does not work. Even resolutions can vary from device to device, and monitor to monitor. That is why CSS often adjusts size by percentage instead of pixels for width values.
To create code that is conditional such as based on device screen size, code must be written in the html file. It would be with a meta tag with viewport that is written the same for every page.
In CSS a media query is called by @media screen. This specifies the screen as a condition. Then you add “and” plus the values closed within a set of parentheses.
It’s much easier to just write the code but I still haven’t remembered them.
Thanks for reading!