Perfect Full Element Background Image With CSS3

An HTML element can have a background image. Normally we set it no-repeat, repeat-x, or repeat-y, regardless it is centered or x-y-positioned. There is time we may want it to be covered all over an element, regardless it’s size. Now, we can do this purely through CSS thanks to the background-size property now in CSS3. We’ll use the html element (better than body as it’s always at least the height Continue reading

CSS Box Model

HTML elements consists of inline and block elements. All of them are box models even for inline elements such as <em>, <span>, or <strong>. Each box has it’s own (default) border, margin, and padding size. Put the following CSS code to your web pages to see (the box) by yourself temporarily: * { border: 1px solid red !important; } With the above CSS, all elements will have a 1px solid Continue reading

CSS Starter Snippets

Below is CSS starter to reset CSS properties which are predefined by web browsers. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, Continue reading