Is there a CSS selector by class prefix?

It’s not doable with CSS2.1, but it is possible with CSS3 attribute substring-matching selectors (which are supported in IE7+): div[class^=”status-“], div[class*=” status-“] Notice the space character in the second attribute selector. This picks up div elements whose class attribute meets either of these conditions: [class^=”status-“] — starts with “status-“ [class*=” status-“] — contains the substring … Read more

How to align an image dead center with bootstrap

Twitter Bootstrap v3.0.3 has a class: center-block Center content blocks Set an element to display: block and center via margin. Available as a mixin and class. Just need to add a class .center-block in the img tag, looks like this <div class=”container”> <div class=”row”> <div class=”span4″></div> <div class=”span4″><img class=”center-block” src=”logo.png” /></div> <div class=”span4″></div> </div> </div> … Read more

CSS 3 slide-in from left transition

You can use CSS3 transitions or maybe CSS3 animations to slide in an element. For browser support: http://caniuse.com/ I made two quick examples just to show you what I mean. CSS transition (on hover) Demo One Relevant Code .wrapper:hover #slide { transition: 1s; left: 0; } In this case, I’m just transitioning the position from … Read more

Change bootstrap navbar collapse breakpoint without using LESS

2018 UPDATE Bootstrap 4 Changing the navbar breakpoint is easier in Bootstrap 4 using the navbar-expand-* classes: <nav class=”navbar fixed-top navbar-expand-sm”>..</nav> navbar-expand-sm = mobile menu on xs screens <576px navbar-expand-md = mobile menu on sm screens <768px navbar-expand-lg = mobile menu on md screens <992px navbar-expand-xl = mobile menu on lg screens <1200px navbar-expand = … Read more

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