Full-Stack Software Engineer, Designer, and salsa dancer.

10 Followers
·
Follow

black and white dappled light on leaves
black and white dappled light on leaves

What

An enum is a special data type that allows you to declare and query data with string variables but stores an integer in the database. You can think of an enum as being able to set a variable to a value (for Ruby on Rails, its an integer value). For example, if you want a status column in your database model, you could set the status to enum type and store your possible statuses started, in progress, and complete, as 0, 1, and 2.

Why

Not only does this let developers write more semantic code, but it’s also more space-efficient, less bug-prone, and easy to update down the road! …


Types of Positioning: Static, Relative, Absolute, Fixed, Sticky
Types of Positioning: Static, Relative, Absolute, Fixed, Sticky

Positioning lets you take specific elements our of the normal document flow and change their behavior. Below is guide on how each one works, with examples to boot.

Syntax

The CSS code looks pretty similar regardless of the type of positioning your design requires:

.positioned {
position: relative;
top: 0px;
right: 40px;
bottom: 10px;
left: 0px;
}

Types of Positioning

1. Static positioning (in-line by default)

Static positioning screenshot
Static positioning screenshot
View on Codepen

By default, HTML elements are positioned in line with the normal document layout flow. Static position can be explicitly specified like this:

position: static

although it’s usually unneccesary.

2. Relative Positioning

Relative positioning screenshot
Relative positioning screenshot
View on Codepen

Relative positions element relative to its in-line placement in the document. For instance in the example above, the Relative orange element is positioned 50px from the left and 10px from the top of its inline placement. Notice also that the space the element took up in it’s inline placement is still left over. The elements beneath it didn’t move in to fill the gap. That’s because it hasn’t actually been taken out of the document flow, so it’s spacing is still accounded for. …


While it’s easier (and better practice) to design and style your app for various screen sizes from the beginning, it IS possible to add responsive design to your projects after you’ve begun. Want to retroactively add responsiveness to an existing app? Here are 6 tips to get you started.

Small egg, big egg
Small egg, big egg
Learn how to scale your websites for various screen sizes

Background

Learning to code in a Bootcamp program has lots of advantages. …

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