Chrome Developer Tools allows you to apply a style rule in the Styles pane. I haven\'t found a way to do this in Safari (Style Rules pane). Any one know if it is possible?
Safari 8.0.8 on OS X
As for a ruler? Well, I haven't found one, but the Inspect button will give you the dimensions of elements when hovered in the browser window.