Thursday, June 22, 2017

CSS margins vs padding

I read an article about 2 months back about padding and margins in CSS which I did not understand completely previously but gained clarity through the article: https://www.sitepoint.com/set-css-margins-padding-cool-layout-tricks/

The padding of an element is the layer that begins from the outer edge of the content and ends at the inner edge of the border. And the margin begins from the outer edge of the border.

I've recently started creating my own website in php and knowledge of this was invaluable in developing the layout especially the menu.

It's good to know the difference between margins and padding as it saves alot of confusion when developing your front end. You will know immediately what is needed when adjusting the space between your elements or space between your content and border.

How to Access the Metaverse

In February this year, Bernard Marr predicted that "in 2022, we'll see new, lighter, more portable VR devices, so instead of having...