HTML and CSS Reference
In-Depth Information
Now we can see our footer's background color, and it appears as shown in Figure 3.10 .
Figure 3.10. Our footer with an RGBA background color
Note: Float Clearing 101
The float-clearing problem that sprung up again in this chapter as a result of
floatingtheelementsinsidethefootercouldoccurmultipletimesduringapro-
ject. So, if you're trying to figure out why a background color or background
image is not appearing, the first thing you should do is add the clearfix code
to that element (or overflow: hidden , if you prefer that method) and see
if that fixes it.
What about HSLA? This works the same way as RGBA. So, if you want to define an alpha
setting on any HSL color, use hsla() notation and add a fourth value:
footer {
background-color: hsla(334, 91%, 14%, .5);
}
This will achieve the same result, being the equivalent color in HSL, along with the .5 alpha
setting.
Search WWH ::




Custom Search