Entries by jay

Css width vs. flex-basis: what’s the Difference?

There is a time in every frontend developer’s life when they learn flexbox and ask: what is the difference between width and flex-basis? They look the same at first glance. The answer is that in some cases they are them same. There are a couple edge cases you have to be aware of. flex-basis by […]

CSS Inheritance in Practice

Inheritance simply means that in certain cases a child element can inherit properties from the parent element. You can think of it like a default value for certain types of elements and its properties. It is a common practice to set general text formatting on the body. Paragraphs will inherit those properties even several levels […]

CSS Specificity Explained in Simple Terms

To make our life easier, the designers of CSS created multiple levels of specificity depending on the selector. The three main kinds of selectors are: element class id There are also combinations of the above and pseudo elements and classes. The traditional way of measuring specificity is to assign number values. Element selectors have a […]

Creating Links that Look like Buttons in CSS

I have written about styling links in CSS in another post. Creating the kind of buttons you see in website navigations is also done with simple links. The most widely used method to do it is to add display: inline-block; to the link and then apply padding. By default, links are inline elements, you applying […]

Styling Links with CSS

You can style links by applying styles to a elements. a elements have five states that you can target with your styles: link visited focus hover active The order of these states in a stylesheet is very important. These states are additive, so even though a link is visited, the link style still applies to […]

CSS Inline and Block Elements

Block level elements will start a new line and will stack on top of each other. Block elements by default are: paragraphs headings lists and list items divs header footer main section and more. Inline elements stay in an existing line. A good way to remember inline elements is to think about links. You know […]

CSS Margin and Padding

Margin is the spacing between elements, like heading and paragraphs. Browsers all have their defaults. For heading and paragraphs, the default is the font size for both margin-top and margin-bottom. Centering with Margin Setting the left and right margin to auto on an element will let you center it. You can also do that in […]

Dell’s Technical Support Sucks (XPS 13)

I have bought a used Dell XPS 13 a couple months ago. I had Dell laptops in the past and I was very happy with their home support. I was traveling at the time and they have even managed to replace the motherboard of my laptop in China while on the road. After that I […]

Node global vs. window Object

You know how when you declare a variable with var in a browser, it will be added to the window object. That’s not the case with the global object. In node, every file is a module. If you want to use a variable outside a module, you have to export it and then import it. […]

The Difference Between Git and Github

Back when I started learning web development, I had no idea what Git and Github was. Later I learned that Git is a version control system. I had a vague idea what that is. But what is Github then? And how are they different? Git – A Version Control System Git is a free and […]