CSS selector for element within element with inline style?

A bit late to the tea party but thought I would share the solution I found & use. @simone’s answer is perfect if you can match the style attribute exactly. However, if you need to target an inline style attribute that may have other inline styles associated with it you can use: p[style*=”text-align:center;”] “*=” means … Read more

Using percentage values with background-position on a linear-gradient

TL;DR All the percentage values used with background-position are equivalent when using a gradient as background, so you won’t see any difference. You need to specify a background-size different from the container size: body { display: flex; flex-direction: column; justify-content: space-around; align-items: center; min-height:90vh; } .button { text-decoration: none; color: white; font-weight: bold; width: 350px; … Read more

Parent Height doesn’t follow their float children [duplicate]

Add overflow:hidden; to the container: #mainContainer{ width: 1000px; /*height: 1000px;*/ height:auto; margin-left:auto; margin-right:auto; background-color: #ff6600; padding-bottom: 20px; overflow: hidden; /* <— here */ } Because its content is floated, the container div collapses. Using a ‘clearfix’ class or, as I mentioned, adding overflow:hidden will cause the container to contain the floated elements. UPDATE Explanation of … Read more

Twitter Bootstrap 3 Modal with Scrollable Body

Just add: .modal-content { height:250px; overflow:auto; } The height can of course be adapted to your personal needs. Working Example Update: It’s actually pretty easy. Just add: .modal-body { max-height: calc(100vh – 212px); overflow-y: auto; } to your css. It uses vh and calc, which also happen to have a good browser support (IE9+). This … Read more

How to set the CSS content property with a Google Material Icon?

Update on 2018 Google removed the codes which were displayed earlier for IE9 and below. To get the codes visit the codepoints file in the GitHub repository. Link to codepoints in GitHub repository: https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.codepoints Step 1: Include the Material Icons Stylesheet. <link href=”https://fonts.googleapis.com/icon?family=Material+Icons” rel=”stylesheet”> Step 2 : CSS Code: .bullet li a:before { font-family: “Material … Read more

Remove shadow/background glow on highcharts data label?

Set dataLabels.styles.textShadow to false. plotOptions: { columnrange: { // or general options: “series: { … }” dataLabels: { enabled: true, color: ‘red’, style: { textShadow: false } } } }, Demo: http://jsfiddle.net/oe1vcmqj/2/ EDIT: Since Highcharts 5.0.3, the option name is textOutline. plotOptions: { columnrange: { // or general options: “series: { … }” dataLabels: { … Read more

tech