Ben Patton

CSS & Divs

This is an article that I originally wrote for my Wordpress site but have moved here.

Day two through the end of Week one we were learned how to write efficient html and CSS. Since we were in the beginning stages of learning how to do web development, we learned that there are so…many…div’s. A div is an element that essentially divide’s the page into sections. It can get super confusing, when using just basic code and not templates, because your html page can start to look like the matrix.

To the div you can assign classes which help to style the layout of your web page through the use of CSS. A div with a class or id is written as follows <div class="my-div"></div>

Then in your CSS, either in a new file called filename.css or in the html file using style tags, you can style your code. Coder’s have a love hate relationship with CSS. If you enjoy making things look nice, CSS will not frustrate you as much. If you want to make things work, CSS is beyond frustrating. It is not that it is too hard to learn, necessarily, there is infinite possibilities for how you can style things. So if you like fonts, colors, etc, (think graphic design even though graphic designers might not like me saying that) then CSS is your cup of tea but you can add any sweetener and doctor up your tea however you like, or drink coffee. Hopefully the point has been made. My last comparison, if you are an artist, in the realm of painters because everyone can consider themselves and artist, then you would enjoy CSS. Color wheel’s and spectrums and the like.

So after we learned a bit of CSS we created the basic first page of a website. For day 3 this was a feat for most of us. It took us the majority of the day but using html and CSS we knew we made it look about as close as possible.

By the end of the week we had learned enough to recreate a the landing page of a website. We did this by recreating the Airbnb landing page.

Reflections

Till next time.

– Ben