acnos Posted July 18, 2018 Share Posted July 18, 2018 Hi all ! I wrote this short code : <html> <head> <style> table, th{ max-width: 600px; } .e2 { width: 200px; } </style> </head> <div style="background-color:TRANSPARENT;width:603px"> <body> <table> <tr bgcolor="TRANSPARENT" height="20"> <td class="e2" style="background-color:GREEN"></td> </tr> </table> </body> </div> </html> I have a data base column (in oracle apex), And I would like to have something like that (a multiplication) : .e2 { width = #column# * 600; } Because I would like to have a green horizontal bar chart with different size depending on the values in my database column. So, I tried calc() : did not work... And I also tried : <td style="background-color:GREEN" width=#column#*600></td> <td style="background-color:GREEN" width=calc(#column#*600)></td> Those 2 lines did not work too.. Do you have any idea how to do this multiplication please ? Best regards, acnos Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2018 Share Posted July 18, 2018 You are using width attribute not css styling, and it can only use numbers with % px etc with operators '-', '+', '/' and '*' https://developer.mozilla.org/en-US/docs/Web/CSS/calc Link to comment Share on other sites More sharing options...
acnos Posted July 19, 2018 Author Share Posted July 19, 2018 Thank you dsonesuk for your answer ! I will try something different then Link to comment Share on other sites More sharing options...
dsonesuk Posted July 19, 2018 Share Posted July 19, 2018 Can you actually get it to show any value within a page using oracle? that is the most important requirement before proceeding further. Link to comment Share on other sites More sharing options...
acnos Posted July 24, 2018 Author Share Posted July 24, 2018 On 7/19/2018 at 4:16 PM, dsonesuk said: Can you actually get it to show any value within a page using oracle? that is the most important requirement before proceeding further. I did not understand what you wrote... Link to comment Share on other sites More sharing options...
dsonesuk Posted July 24, 2018 Share Posted July 24, 2018 Are you able to set a variable IE for php page $column = 60; and add that to <img src="whatever.jpg" width="<?php echo $column; ?>" alt=""> output: <img src="whatever.jpg" width="60" alt=""> Until you can achieve this, you won't be able to do any manipulation like what you require. 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