View on GitHub

reading-notes

My learning journal for Code Fellows

CSS and the Joys of Style

What CSS Does

Think of CSS as the paint, window dressing, and general aesthetic of a house, while HTML is the structural load bearing elements of a house. Yes it is perfectly legal to live in a house with no paint or aesthetic elements. But is that house really worth living in?

CSS makes websites engaging and easy to digest from a user point of view, and user engagement translates to more web traffic, which translates to more money if you are selling any sort of product on the site. You know, if you like that sort of thing

CSS in Practice

The basic premise of using CSS is selecting an HTML element that you have already coded, and manipulating the look of that element. That is why it is so important to have good semantics within your HTML code. By giving a good understanding of what is where on the page within the HTML code, it is much easier to pick which specific element you want to manipulate in CSS.

In my own experience CSS is very much based off a trial and error system. Input a value and see how it affects the output, tweak from there until it fits

Example Code

section img{
    border: solid white;
    border-width: 3px;
    width: 750px;
    }

This code would change all the images contained within the section tag so they would have a solid white border, that border would be 3 pixels wide, and the width of the picture would be 750 pixels.git commi

Back to main page