Haml: How to set inline style for element in HAML
Solution 1:
It would have been handy if you'd posted the HAML you're using, but this is how it's done:
%div.some{ :style => "position: absolute; left: 300px; top: 300px;" }
Solution 2:
No need to use %div
:
.some{ style: 'position: absolute; left: 300px; top: 300px;' }
Solution 3:
Another approach in addition to the hash one by Dan Cheail is such:
%div.some(style='position: absolute; left: 300; top: 300;')