I’m working on a template, and I know using CSS is better than using HTML tables for positioning… But, is it acceptable to get the best of both worlds and use table-like styles on my divs? For example:
display: table;
This would not only help me solve the sticky footer problem, but I could avoid the pains associated with floats as well. Not sure if this would be considered an ugly hack or an eloquent solution. Thoughts?
I personally see nothing wrong with using
display: table. I would not recommend widespread use of it, but sometimes it can be very useful for making something display the way you want without having to add a bunch of extra HTML or deal with an onerous set off CSS rules to get something to look the way you want it to.If it works for the client browsers you are targeting in your development and can save you pain or complexity in other areas, than feel free to use it.