Tag Archives: css

Screen width for CSS media rules

Below shows the width and device-width for the current browser, as used for CSS media rules max-width/min-width and max-device-width/min-device-width. Continue reading

Using CSS :first-child / :last-child

The CSS selectors :first-child and :last-child are used to apply CSS styling to the first, or last element that is a child of the parent. For example, if you have the following list: You could give the first element a … Continue reading

Using CSS “display: table-cell” for columns

I’ve been using display: table-cell and display: table in CSS for a couple of different projects recently and have been impressed by the results. The styling is used to make elements, such as <div> tags behave like <table> and <td> … Continue reading

Vertically aligning HTML

Vertically centering HTML always seems more difficult than one would expect given how easy it is to horizontally centre text. It would follow that with vertical-align: middle; vertical alignment would be just as easy via CSS. Alas, centring vertically invariably … Continue reading

Using fonts on the web

The fonts available when a web page is rendered in a web browser depend on which fonts are installed on the user’s system. While a user can install more fonts, it is the fonts that come as default for an … Continue reading

This site uses cookies. Find out more about cookies.