Calc of max, or max of calc in CSS

A ‘pure’ css solution actually is possible now using media queries: .yourselector { max-width: calc(100% – 80px); } @media screen and (max-width: 500px) { .yourselector { max-width: 500px; } }

Bootstrap 4, How do I center-align a button?

In Bootstrap 4 one should use the text-center class to align inline-blocks. NOTE: text-align:center; defined in a custom class you apply to your parent element will work regardless of the Bootstrap version you are using. And that’s exactly what .text-center applies. <link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css”> <div class=”container”> <div class=”row”> <div class=”col text-center”> <button class=”btn btn-default”>Centered button</button> … Read more

Make Font Awesome icons in a circle?

With Font Awesome you can easily use stacked icons like this: <span class=”fa-stack fa-2x”> <i class=”fas fa-circle-thin fa-stack-2x”></i> <i class=”fas fa-lock fa-stack-1x fa-inverse”></i> </span> refer Font Awesome Stacked Icons Update:- Fiddle for stacked icons

What is the ‘.well’ equivalent class in Bootstrap 4

Update 2018… card has replaced the well. Bootstrap 4 <div class=”card card-body bg-light”> Well </div> or, as two DIVs… <div class=”card bg-light”> <div class=”card-body”> … </div> </div> (Note: in Bootstrap 4 Alpha, these were known as card-block instead of card-body and bg-faded instead of bg-light) http://codeply.com/go/rW2d0qxx08

What is the difference between :first-child and :first-of-type?

A parent element can have one or more child elements: <div class=”parent”> <div>Child</div> <div>Child</div> <div>Child</div> <div>Child</div> </div> Among these children, only one of them can be the first. This is matched by :first-child: <div class=”parent”> <div>Child</div> <!– :first-child –> <div>Child</div> <div>Child</div> <div>Child</div> </div> The difference between :first-child and :first-of-type is that :first-of-type will match the … Read more

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