Applying Comic Sans Ms font style

The font may exist with different names, and not at all on some systems, so you need to use different variations and fallback to get the closest possible look on all systems: Be careful what you use this font for, though. Many consider it as ugly and overused, so it should not be use for … Read more

Nesting CSS classes

Not possible with vanilla CSS. However you can use something like: Sass Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. Or Less Rather than constructing long selector names … Read more

How to vertically align an image inside a div

The only (and the best cross-browser) way as I know is to use an inline-block helper with height: 100% and vertical-align: middle on both elements. So there is a solution: http://jsfiddle.net/kizu/4RPFa/4570/ Show code snippet Or, if you don’t want to have an extra element in modern browsers and don’t mind using Internet Explorer expressions, you can use a pseudo-element and add it … Read more

Is there a color code for transparent in HTML?

There is not a Transparent color code, but there is an Opacity styling. Check out the documentation about it over at developer.mozilla.org You will probably want to set the color of the element and then apply the opacity to it. You can use some online transparancy generatory which will also give you browser specific stylings. e.g. … Read more

How to change the color of an svg element?

You can’t change the color of an image that way. If you load SVG as an image, you can’t change how it is displayed using CSS or Javascript in the browser. If you want to change your SVG image, you have to load it using <object>, <iframe> or using <svg> inline. If you want to use the techniques in the … Read more

What does auto do in margin: 0 auto?

When you have specified a width on the object that you have applied margin: 0 auto to, the object will sit centrally within it’s parent container. Specifying auto as the second parameter basically tells the browser to automatically determine the left and right margins itself, which it does by setting them equally. It guarantees that the left and right margins will … Read more

How can I vertically center a “div” element for all browsers using CSS?

Below is the best all-around solution I could build to vertically and horizontally center a fixed-width, flexible height content box. It was tested and worked for recent versions of Firefox, Opera, Chrome, and Safari.  Run code snippetExpand snippet View A Working Example With Dynamic Content I built in some dynamic content to test the flexibility and would … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)