Ben Patton

Thoughts. Technical tips. And other things.

← Back

CSS & Divs

August 18, 2020

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

  • Even though it was a lot of tedious work using basic HTML and CSS, it was nice to see what we were able to do with not a lot of tools.
  • Personally, it is very nice to be doing something that takes a lot of time to complete. Obviously the goal is to get better and more efficient but it is nice to know what I am to be doing and work at it till it is completed. This is how I like to work and it took me a long time to figure that out before coding bootcamp.
  • As my next blog will deal with some Javascript, I can go ahead and say I am excited to become more proficient with this stack and learn frameworks that serve to help us become better developers.
  • Someone might ask the question, “why not just learn the frameworks and then not have to deal with all the frustration without them?” My understanding is that if we went straight to frameworks we would not understand most of what we are using the frameworks for. So we are building a very foundational level of understanding and then getting into frameworks. Once we do, even though there will be a learning curve, it will be a lot smoother than if we just tried to understand a framework before knowing the basics. My best analogy at this point, which I am sure someone could refute, is that it is like trying to be a mechanic without understanding anything about cars.

Till next time.

– Ben