Given a div of unknown dimensions how can I draw a solid line from one corner to the diagonally opposite corner without using JavaScript?
I thought the CSS3 calc()
function might help me here but it seems you can't pull values from the height and width into another property (e.g. transform or background-image)
I was hoping I could do something like:
transform: rotate ( calc(atan(height / width)) rad);
(The calculation is probably wrong but more important is that the syntax is totally invented.)
I am targeting Firefox for this project but would prefer something that will work in any modern browser.