How to use Apple’s new San Francisco font on a webpage

Apple’s new system font is not publicly exposed. Apple has started abstracting system font names: The motivation for this abstraction is so the operating system can make better choices on which face to use at a given weight. Apple is also working on font features, such as selectable “6″ and “9″ glyphs or non-monospaced numbers. … Read more

vertical align middle in

You can use line-height: 50px;, you won’t need vertical-align: middle; there. Demo The above will fail if you’ve multiple lines, so in that case you can wrap your text using span and than use display: table-cell; and display: table; along with vertical-align: middle;, also don’t forget to use width: 100%; for #abc Demo #abc{ font:Verdana, … Read more

How do I center align horizontal menu?

From http://pmob.co.uk/pob/centred-float.htm: The premise is simple and basically just involves a widthless float wrapper that is floated to the left and then shifted off screen to the left width position:relative; left:-50%. Next the nested inner element is reversed and a relative position of +50% is applied. This has the effect of placing the element dead … Read more

How to remove Left property when position: absolute?

left:auto; This will default the left back to the browser default. So if you have your Markup/CSS as: <div class=”myClass”></div> .myClass { position:absolute; left:0; } When setting RTL, you could change to: <div class=”myClass rtl”></div> .myClass { position:absolute; left:0; } .myClass.rtl { left:auto; right:0; }

Stacking DIVs on top of each other?

Position the outer div however you want, then position the inner divs using absolute. They’ll all stack up. .inner { position: absolute; } <div class=”outer”> <div class=”inner”>1</div> <div class=”inner”>2</div> <div class=”inner”>3</div> <div class=”inner”>4</div> </div>

How to write a caption under an image?

Figure and Figcaption tags: <figure> <img src=”https://stackoverflow.com/questions/10128950/image.jpg” alt=”missing” /> <figcaption>Caption goes here</figcaption> </figure> Gotta love HTML5. See sample #container { text-align: center; } a, figure { display: inline-block; } figcaption { margin: 10px 0 0 0; font-variant: small-caps; font-family: Arial; font-weight: bold; color: #bb3333; } figure { padding: 5px; } img:hover { transform: scale(1.1); -ms-transform: … Read more

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