Fit background image to div

You can achieve this with the background-size property, which is now supported by most browsers. To scale the background image to fit inside the div: To scale the background image to cover the whole div: JSFiddle example There also exists a filter for IE 5.5+ support, as well as vendor prefixes for some older browsers.

CSS Box Shadow – Top and Bottom Only [duplicate]

As Kristian has pointed out, good control over z-values will often solve your problems. If that does not work you can take a look at CSS Box Shadow Bottom Only on using overflow hidden to hide excess shadow. I would also have in mind that the box-shadow property can accept a comma-separated list of shadows … Read more

Using custom fonts using CSS?

Generically, you can use a custom font using @font-face in your CSS. Here’s a very basic example: Then, trivially, to use the font on a specific element: (.classname is your selector). Note that certain font-formats don’t work on all browsers; you can use fontsquirrel.com‘s generator to avoid too much effort converting. You can find a … Read more