Html style of standard app buttons?

I have next to no experience with html/css, but I have nonetheless been able to create a simple table display in a custom app I've written. After searching these forums, I've managed to add some buttons to my screen that do what I want them to, but they look and act nothing like the buttons you get by using a standard input of type "button". I'm assuming it's just knowing the correct "style" setup for the button that will solve this issue, but I have no clue how to set that up.

Can anyone enlighten me?

Thanks!

Are you trying to add buttons independent of the table or add them to the table?

I presume the latter. If so, maybe my code can get you in the right direction:

Lines 653-688. 680 and 681 are injecting buttons at the bottom of the table.

2 Likes

Thanks for the quick reply!

Actually, I think I can do either. If I want them in the table, I can just add the HTML in with that code. If I want them separate on a "normal" input screen, I can put the code in a "paragraph" (which is how I'm currently displaying my table).

I see and understand (at least a little!) what you're doing here, and I'm pretty sure I could implement something like that if needed, but...

My problem is that I want to duplicate the same appearance (3-D look, shading change on hover, size, font, etc.) of the buttons that a normal input statement creates (like a "Done" button or the "Refresh Table" button in your app). I assume I just need a "style" statement with the appropriate specifications, but I have no idea what those specifications are. I'd assume someone like @bravenel would know. For example, just playing around with it I added :

style='border: 2px solid black;font-size: 12px;'

to my <button> stuff, and it does what I told it to, but it is nowhere near correct. So I'm assuming I just need the "magic" stuff to put in there instead of my crap.

1 Like

Looks like this is the styling used for the system buttons

<button class="cancel btn btn-success mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect"
                    onclick="closeRemoveDeviceDialog()" data-dismiss="modal" style="margin-right: 0.5em;">
                Cancel
            </button>
1 Like

You'll need to track down some of the classes referenced there.... To get the actual styling. I doubt you will be able to reference the same classes, but may be worth a look

1 Like

Thanks, guys! While you were writing that it suddenly occurred to me that I could just display the page source in chrome, but you isolated the necessary info for me nicely. A quick test looks like I'm headed for success!

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.