Flexbox not full width

The container actually is 100% wide, i.e. spans the full width of the window. But with the default flex settings, its children will simply align left and will be only as wide as their contents. However, if you apply flex-grow: 1; to the child elements to allow them to get wider, they will stretch and … Read more

Background image stretch y-axis only, keep repeat-x

I had this problem too. It’s easy in most browsers, but IE8 and below it’s tricky. Solution for modern (anything not IE8 and below) browsers: #scroller_shadow { background: url(../img/ui/shadow.png) center repeat-x; background-size: auto 100%; } There are jQuery plugins that can mimic background-size for IE8 and below, specifically backgroundSize.js but it doesn’t work if you … Read more

Remove white space below footer [closed]

There are three solutions to this problem In all of the following examples I’ve included an extremely basic HTML-template by only using three divs: header, content and footer. All the options are minified but should work fine on more advanced websites. Using the background-color Set for both the body and footer the same background-color. body … Read more

CSS: last-child of parent

You can use .parent > *:last-child or just .parent > :last-child An asterisk (*) is the universal selector for CSS. It matches a single element of any type. Omitting the asterisk with simple selectors has the same effect. .parent > *:last-child { background-color: red; } <div class=”parent”> <p>First child</p> <input type=”text” placeholder=”Second child” /> <div>Third … Read more

Flex items evenly spaced but first item aligned left

Instead of using justify-content: space-around, use auto margins on the items. By giving each flex item margin-right: auto, container space will be distributed evenly between items (like justify-content), but the first item will remain at the left border edge. flex-container[one] { display: flex; justify-content: space-around; border: 1px dashed green; } flex-container[one]>flex-item { background-color: lightgreen; } … Read more

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