Month: June 2018

News and information about web development

Using Flexbox To Fill The Remaining Space In An Element

June 25, 2018 by David Ugale

Using a Flexbox layout is a great way to fill the available space in an element. For example, say you have a thumbnail and a description that you want to have fill up all of the available horizontal space. The thumbnail will be aligned to the left and will take up a width of 120…

Read more »

Center An HTML Element Using CSS

June 21, 2018 by David Ugale

There are two approaches that we commonly use to center an element. The first approach uses the CSS margin property. The second approach uses absolute positioning and the CSS transform property. Using margin To Center An Element In this approach, we center the element by using auto to set the left and right margins. Note…

Read more »

How To Change An Image On Hover

June 19, 2018 by David Ugale

A common request in our website development projects is to have an image change when the mouse hovers over it. For example, we might want to have this image: look like this when the mouse hovers over it: Our preferred method to do this is to use CSS to: Set an image as the background…

Read more »