NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Button ID or class for CSS
« previous
next »
Print
Pages: [
1
]
Author
Topic: Button ID or class for CSS (Read 3091 times)
rjolda
Sr. Member
Posts: 329
Button ID or class for CSS
«
on:
June 14, 2024, 04:24:34 AM »
Hi
NT 14.21 C11.0.136
I want to be able to identify a button on a form so I can do some css on it.
Here is my button:
<button type="button" name="Button1_3" id="Button1_39ygW" value="Press to Confirm this is the Kiosk you are at" class="nt-flex nt-button nt-button-without-icon confirmKioskButton67 ui-button ui-corner-all ui-widget" data-do="server" data-formproc="a_dropoff_memform">Press to Confirm this is the Kiosk you are at</button>
The id="Button1_39ygW" has a generated portion which changes with each iteration. The 'ygW' portion is generated and variable so I can't use this.
The class="nt-flex nt-button nt-button-without-icon confirmKioskButton67 ui-button ui-corner-all ui-widget" - I probably can use this as the CLASS selector but it is verbose
The name="Button1_3" - is unique but name is not a css selector.
Is my best option to use the class for a selector?
Other options?
Thanks,
Ron
Logged
Alberto
Hero Member
Posts: 1873
Re: Button ID or class for CSS
«
Reply #1 on:
June 14, 2024, 04:27:57 AM »
You can add a class to the button in the CSS tab and define this new class in your css
Logged
-----------
Regards
Alberto
rjolda
Sr. Member
Posts: 329
Re: Button ID or class for CSS
«
Reply #2 on:
June 14, 2024, 04:38:06 AM »
Hi Alberto,
How and where do I add the class to the button - so far, everything i have tried has not done it. Can you give more specifics please.
Thanks,
Ron
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Button ID or class for CSS
«
Reply #3 on:
June 14, 2024, 04:40:14 AM »
>> The name="Button1_3" - is unique but name is not a css selector.
of course it is. You can select on anything in sooo many different ways. Name is an attribute, and you can use attributes in selectors. Specifically;
[name="Button1_3"] {
/* Your CSS styles here */
color: blue;
}
attributes are used in selectors using [ and ]
Cheers
Bruce
Logged
Alberto
Hero Member
Posts: 1873
Re: Button ID or class for CSS
«
Reply #4 on:
June 14, 2024, 04:59:19 AM »
see pic
Logged
-----------
Regards
Alberto
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Button ID or class for CSS