
Best Practices for Cross‑Browser Compatibility
Cross‑browser compatibility ensures a consistent user experience across different browsers. Best practices, CSS and JS techniques, and testing strategies.
Articles
Almost as old as front‑end development itself, CSS is a stylesheet language that describes the presentation of an HTML or XML document. We write CSS to describe how elements should be rendered and animated on‑screen, when printed, in speech, or in other media. In web development, writing CSS is an underappreciated skill that not many fully master.
Below you will find a subset of articles from my blog specifically about CSS. This is an area I have worked with for many years, and it has been a regular subject in my writing. There are eighty‑one articles collected together for you below.

Cross‑browser compatibility ensures a consistent user experience across different browsers. Best practices, CSS and JS techniques, and testing strategies.

Integrating CMSes with HTML, CSS, and JavaScript enables dynamic, flexible content management. Here, I explore best practices, performance tips, and SEO.

transformCSS transforms enable us to manipulate elements with operations like rotate, scale, and translate. Here, I discuss how to use and animate them effectively.

:before vs. ::before)CSS pseudo‑elements can use one or two colons. This guide explains `:before`, `::before`, modern syntax, compatibility, and when each form matters.

box‑sizing: Controlling the Element Box ModelUnderstand CSS box‑sizing and the box model, including content‑box, border‑box, width calculations, borders, padding, and layout surprises in real UI.

:hover Pseudo‑Class in CSSThe :hover pseudo‑class seems simple until touchscreens and accessibility get involved. This guide covers how it behaves and where it falls short.

vw and vhUse CSS viewport units vw and vh for responsive sizing, understanding percentage‑of‑viewport behaviour, full‑screen layouts, and mobile browser caveats.

CSS and JS animations enhance user experience by adding smooth transitions and interactivity. Here, I explore best practices, performance, and the real‑world.

Compare CSS transitions and keyframe animations, including hover effects, loading states, timing control, performance, and when each approach fits.


Understand CSS media queries for responsive design, including screen conditions, mobile‑first and desktop‑first approaches, breakpoints, and device traits.

Boost website performance with HTML, CSS & JavaScript optimisation. I explore techniques: lazy loading, critical CSS, script deferment for faster load times.

@keyframesCSS `@keyframes` enables animations by defining style changes over time. Here, I explain how it works with examples, properties, and cross‑browser support.

Whilst understanding any computing language comes with practice and exposure, there are some areas of CSS that can flummox even the most seasoned of developers.

::before and ::after Pseudo‑Elements in CSSUsing the `:before` and `:after` pseudo‑elements in CSS for styling and content insertion. Here, I cover syntax, practical examples, and best practices.

overflow PropertyUnderstand the CSS overflow property, including visible, hidden, scroll, auto, x and y control, scrollbars, accessibility, and mobile quirks safely.

CSS transitions allow us to create smooth animations between states, enhancing user experience. Here, I discuss how to use transitions with practical examples.

Use BEM and Sass together for component CSS with clear naming, shallow nesting, modifiers, reusable mixins, and less fragile front‑end styling over time.