Midway.js – Automatically center the responsive elements on your websites

If you are doing responsive web design, you are aware that sometimes the elements do not behave as you want to. For example, sometimes in smaller screens (tablets and smartphones) elements are floated to the left and this may not look very good. Midway.js is a lightweight plugins that automatically centers the responsive elements of your website. It is very useful, if you are not using absolute positioning to center the elements especially in a layouts which are using percentages.

Midway.js - Automatically center responsive elements!

Don’t struggle alone with projects

Join the creative community of UX, graphic and web designers and developers to get help with any design or dev project.


How to use:

Download Midway.js using the link above, and place it in the root directory of your site. Then place the following right before </head>

<script type="text/javascript" src="midway.min.js"></script>

Depending on if you want your element to be centered horizontally, vertically, or both, add the following classes.

<div class="centerHorizontal centerVertical"></div>

Midway.js was made by Brandon Jacoby, and the rest of the team at Shipp Co.It was created with hopes of making it easier for people to create responsive websites.

Related post:  Materialize CSS - Framework based on Material Design
Divi WordPress Theme

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.