Wonky text anti-aliasing when rotating with webkit-transform in Chrome

Try triggering the CSS 3d Transform mode with webkit. this changes the way chrome renders -webkit-transform: rotate(.7deg) translate3d( 0, 0, 0); edit There also a Webkit only style declaration -webkit-font-smoothing which takes the values none subpixel-antialiased antialiased where subpixel-antialiased is the default value. Alas, the subpixel antialias is no good solution for rotated text. The … Read more

What is HTML’s tag default display type?

It is always display: inline by default. Horizontal margins, and padding on all sides should work without having to change its display property. This remains true even in HTML5. If you are applying styles to an <a> element that contains flow elements or any other elements that are represented in CSS as display: block, you … Read more

Bootstrap 3 – show collapsed navigation for all screen sizes

You can use override the default Bootstrap CSS like this… .navbar-header { float: none; } .navbar-toggle { display: block; } .navbar-collapse { border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); } .navbar-collapse.collapse { display: none!important; } .navbar-nav { float: none!important; margin: 7.5px -15px; } .navbar-nav>li { float: none; } .navbar-nav>li>a { padding-top: 10px; … Read more

Cannot set property ‘display’ of undefined

document.getElementsByClassName(‘btn-pageMenu’) delivers a nodeList. You should use: document.getElementsByClassName(‘btn-pageMenu’)[0].style.display (if it’s the first element from that list you want to change. If you want to change style.display for all nodes loop through the list: var elems = document.getElementsByClassName(‘btn-pageMenu’); for (var i=0;i<elems.length;i+=1){ elems[i].style.display = ‘block’; } to be complete: if you use jquery it is as simple … Read more

CSS – Font being blocked from Cross-Origin Resource Sharing Policy

If you don’t have mod_headers enabled you can enabled it with sudo a2enmod headers And then in your VirtualHost or .htaccess # Allow access from all domains for webfonts. # Alternatively you could only whitelist your # subdomains like “subdomain.example.com”. <IfModule mod_headers.c> <FilesMatch “\.(ttf|ttc|otf|eot|woff|font.css|css|woff2)$”> Header set Access-Control-Allow-Origin “*” </FilesMatch> </IfModule>