Center Of Gravity

Center Of Gravity

Continuing with the theme of Phutureprimitive, today's blog post is named after his trance track "Center of Gravity" (spelled the American way, which is also used in code!!!). I like his use of breath within the song as part of the sounds. 

I think it's very very unique and very very unusual.

Really random picture... this is a cardboard factory in my hometown in Luxembourg.

Can you see those trees? I love them so, so, so much.

I used to go round there and dance to Phutureprimitive's music, when there was no-one around, and it was empty.

Dancing to trance music in a vast, open, empty space... is my idea of heaven.

Centring an Element

Aptly fitting the title of this blog post, my first thought was about how to centre an element. I think that the following code works really well:

selector {
    margin: 0 auto;
}

So if you were thinking of using "margin: center;" like me (oops)... think again... and instead use the above! 

Here it is one more time:

selector{
    margin: 0 auto;
}

So you put 0 margins for top and bottom... and then let it centre automatically to the left and right. 

Scrollable Content

To make an element scrollable, i.e. if the browser gets too small and if your content gets too big, to avoid it from being hidden, you have to use the following code:

selector {
    overflow: scroll;
}

Sleep Debt Calculator

I finally started building that sleep debt calculator project in JS today.

I was really pleased with how well my switch/case statements went. I prefer them to else/if's - and I remembered them BRILLIANTLY!!! 💖💓💓💓💖💖

I got well over halfway through but I have been swamped with meetings EOD.

I am going on holiday for a week now. 

I will pick it up when I get back on the Monday. 



Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing