HTML and CSS Reference
In-Depth Information
CSS3 has been around for longer than you might think. In fact, work had started
on the earliest parts of CSS3 at about the same time as the CSS2 spec was being
finished in the late 1990s. CSS2 has many very powerful features, and you can do a
lot with it, but it was clear all those years ago that despite this a number of features
were missing from the spec. This was evidenced by the fact that web designers tried
to do many tasks using weird and interesting hacks or unusual techniques, often
involving lots of nested <div> s or other semantic backstabbery, images, or even
proprietary technologies like Flash. Some examples that spring to mind include:
Font embedding. Downloading custom fonts for use on websites has been
available in Internet Explorer (IE) since version 4 but wasn't standardized
until years later with CSS3 web fonts. Before web fonts gained popular-
ity and cross-browser support, web developers used to rely on all kinds
of weird replacement techniques, such as image replacement and siFR
(Scalable Inman Flash Replacement—see
Scalable_Inman_Flash_Replacement) if they wanted custom fonts in
Bulletproof CSS. Back in the late 1990s and early 2000s a lot of pioneering
techniques started to spring up for creating CSS UI features that wouldn't
break if the text was resized. The text wouldn't spill messily out of its
containers; instead, the design would expand along with it. These tech-
niques were referred to as “Bulletproof CSS,” and they worked well if done
properly. But often they required a number of nested <div> s, each with
a single background image hung off it. Bulletproof rounded corners on a
container required four nested <div> s! Such designs were inflexible as well.
If you wanted to then change the color of the background, you'd have to
go back into your preferred graphics editor and update all the background
images each time. This is exactly the kind of problem that properties like
border-radius were created to fix.
Search WWH ::

Custom Search