Posts Tagged css

Sending Email awesomely with Rails

If you would like to send HTML Emails with all the bells and whistles that Actionpacks Actionview provides checkout my freshly released plugin awesome_email on github.

It will enable you to use layouts/templates for your HTML Emails and it will inline CSS information inside the HTML to make sure it works in almost all Email clients.

For more information see my blogpost on imedo’s devblog about awesome_email

Tags: , , , , , , , , , , , , , , , , , , , , , ,

Clear a floating element without additional markup

Found at: Position is everything

Normally you would add an element like this:

<div style="clear:both">&nbsp;</div>

after your floating elements to clear them. With this method you don’t need to do this anymore.

Just add this to your stylesheet:

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

.clearfix {display: inline-block;}

/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

and also add the “clearfix” class to the element that wraps your floating element. That’s it.

Tags: , , , , , , , ,