liderbug Posted February 10, 2019 Share Posted February 10, 2019 I'm displaying a answerbox(s) on a map and now I want to be able to rotate some of them by X deg. Here's what works sans rotation. ----------------------------- .answerbox{ height: 38; /*Specify Height*/ width: 42px; /*Specify Width*/ border: 2px solid black; /*Add 1px solid border, use any color you want*/ background-color: #ffbbbb; /*Add a background color to the box*/ text-align:center; /*Align the text to the center*/ font-family: "Times New Roman", Times, serif; margin-left: 0px; margin-right: 0px; margin-top: 0px; margin-bottom: 0px; } --------------- div class='answerbox; style='position: absolute; top: $y; left: $x;' ===================== x, y and rotate comes from a mysql query and div class='anserbox2fn; rotate=${rotate}deg, style='position: absolute; top: $y; left: $x;' doesn't work nor does div class='answerbox; style='position: absolute; top: $y; left: $x; transform: rotate=45deg'> Thanks in advance And I've tried several other variations without any luck. Link to comment Share on other sites More sharing options...
liderbug Posted February 11, 2019 Author Share Posted February 11, 2019 Got it. $rot = "style='transform: rotate(${rotate}deg);"; echo "\n<div class='$abmf'; $rot position: absolute; top: $y; left: $x;'>"; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now