Skip to Content
avatar image
Former Member

Adding css class to a button inside a table

Hi Experts,

I have a table in which one column is for quantity left. My requirement is in that column i need to show a small square with different borders like red for less than 500, green for more than 2000,etc.

For the square I thought of making a button of 16pxX16px but adding the margin based on data is the issue.

Please help me out with your suggestions over this.

Thanks,

Mansi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 04, 2015 at 05:32 AM

    Hi Dennis & Sai,

    Thank u so much for replying. Your codes are definitely a great help.

    I just wanted to know that can I assign a complete css class conditionally to this button.

    Coz in my case for some condition the box should be half filled and in some it is to be completely filled and in some it is to b transparent along with different borders. I have made classes but how do I assign those class itself to the button and not jst the border, conditionally.

    Any Idea on this?

    Thanks,

    Mansi

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2015 at 04:44 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2015 at 04:52 AM

    Hi Mansi,

    Will this help? Plunker

    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded