Using CSS position: sticky

In this article we’ll see how to create list and table sticky headers using only HTML and CSS.

Recently I needed to create a sticky header, so I searched for the best way to do it. I read many articles and posts, but it was not easy to find updated and clear information about this subject, mainly because recent updates to browsers compatibility make many articles outdated. So I’ll share what I’ve learned with you, including some demos I’ve built to test the concepts.

If you just want to grab the code, skip to “Live demo, complete code and fiddle”…


Starting in the world of 3D programming may not be easy. There are many new concepts if you come from the 2D world: 3 axes, rotation, camera, lights, materials, rendering, … And when you are starting, a good way to learn is to quickly visualize the results of what you are doing. What happens to an object if z position is set to 3? and if set to -5? and rotating y axis by 1.5? To quickly answer these (and others) questions, and help you enter the 3D world, I’ve built a Playground. I’ll tell you why and how.

Go…


Step-by-step Tutorial

XML is old news. But maybe you have never used it and now you need to. It happened to me recently. In this article I’ll share what I’ve learned about building an XML API, using a step-by-step tutorial.

Level: beginner

Pre requisites: basic knowledge of Rails

Create a basic CRUD App

Our API must read data from somewhere. So we’ll start by creating a basic CRUD app to hold some data about products and categories that will be read by our API.

Create a new rails project with the name xml-api:

$ rails new xml-api$ cd xml-api

Now let’s scaffold our app with two…


Step-by-step Tutorial

In this tutorial we will create a “Todo” rails app, attach pictures and other files to local disk and to Google Cloud Storage, using Rails Active Storage. Finally we will deploy our App to Heroku using Git.

Level: beginner

Pre requisites: basic knowledge of Rails and Git

Let´s start by confirming we have the necessary software versions installed.

We need Rails 5.2, because this is the version that launched Active Storage, and it needs Ruby version 2.2.2 or later.

rails -v
ruby -v

and if all is ready let’s create our Rails app:

rails new todo-pic
cd todo-pic


Step-by-Step Tutorial

In this tutorial we’ll talk about how to use Google Maps API with Rails. We’ll see some examples of using Static API and Javascript API, how to place a marker and how to update the marker position when we change a form input value. And finally how to update the input value by dragging the marker. All of this without using any gems.

Level: beginner

Pre requisites: basic knowledge of Rails and Javascript

Setup Rails

Please confirm that you have rails >= 5.2 installed (so you can use Rails Credentials)

rails -v

Now let’s create a rails App:

rails new gmaps-rails-example
cd…

Paulo Belo

Developer. Freelancer. Co-founder of Guestly.net. Co-parent of 2 boys.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store