Relative Content

Tag Archive for css

Switching CSS to use asset pipeline in Rails?

I have a lot of legacy CSS files from what was a Rails 2.x app that got upgraded to Rails 3.2.8, and I want to switch over to using the Rails asset pipeline for stylesheets. The issue is, the CSS stuff is messy in terms of huge lines of code, duplicate file names, and unorganized folder structure.

How to set a background image using object-fit and have it fill the parent container without setting a height for the parent?

<div class=”parent”> <img class=”background” src=”image.jpg”> <div class=”content”> <h1>Some Text</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt magna quis nibh congue hendrerit. Maecenas ultricies diam eget diam volutpat, a posuere leo varius. Pellentesque varius nulla nec felis dapibus, vel varius turpis dignissim. Suspendisse porttitor cursus orci vitae rutrum.</p> </div> </div> .parent { position: […]