Concrete 5 image align left margin or padding


On 02-16-2015 articles, concrete 5

Adding images in Concrete 5 is simple, just like any other WYSIWY editor. Just click the image icon choose your image from either the image manager, or from your computer and done! And of course you usually want to align/float the image left or right, Concrete has this option as well. But it’s lacking one small thing, padding or margin. Resulting in the text being jammed right up next to the image. Now it would be nice if Concrete 5 adding a class to images that get aligned left or aligned right but what it does instead is just adds an inline style of float left or float right. Making it a bit more difficult to style in css, not to mention throws off a responsive design. I tried to find a way to over ride this bad technique of adding an inline style of float, but without hacking the core I have yet to find a solution. Version 7 might of fixed this problem but I haven’t tested it out yet, I am using Version 6. Here is a quick way for a fix in CSS. It’s a little bit of an advanced selector but works.

img[style*="right"] {
 margin-left: 20px; 
}
img[style*="left"] {
 margin-right: 20px; 
}