CSS: Web design: Vertical centering

The tutor looks into a simple layout technique.

In web design, vertical centering is often desirable. Here’s a quick example:

Hello! This text is vertically centered. See the code below.

<div style=”height:11em;
display:table-cell;vertical-align:middle;
background-color:LightGreen;color:white;
font-size:150%”><div>

I’ll mention other web design techniques in future posts:)

Source:

w3.org

w3schools

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply