Path: csiph.com!aioe.org!news.mb-net.net!open-news-network.org!.POSTED.4.235.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.infosystems.www.authoring.stylesheets,comp.lang.javascript Subject: Re: Buttons glowing on being selected Followup-To: comp.infosystems.www.authoring.stylesheets Date: Wed, 20 Dec 2017 01:29:29 +0100 Organization: PointedEars Software (PES) Lines: 42 Message-ID: <2306836.4kSItuVXeT@PointedEars.de> References: <87zi6gx8nt.fsf@bsb.me.uk> <240a60f2-954f-439e-9fbe-73826174085b@googlegroups.com> <87zi6eguk0.fsf@bsb.me.uk> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Info: gwaiyur.mb-net.net; posting-host="4.235.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch:178.197.235.4"; logging-data="23902"; mail-complaints-to="abuse@open-news-network.org" User-Agent: KNode/4.14.2 X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. bit-naughty@hotmail.com writes: >> Ben Bacarisse wrote: >>> You don't need client-side scripting for this. Here is a very simple >>> example using CSS: >>> >>> http://bsb.me.uk/testing/button.html >>> >>> and another where you can see it in action with a submit button: >>> >>> http://bsb.me.uk/testing/button.php >>> >>> The idea is that you style the label of a checkbox. I've chosen to >>> hide the checkbox, but you don't have to do that. >>> >>> You can view the PHP source at http://bsb.me.uk/testing/button-php.txt >> >> Ben, for the 1st URL - what's the "label input { display: none; }" >> line for? > > It hides the input checkbox. You should use visibility: hidden; /* or opacity: 0 */ margin: 0; padding: 0; width: 0; height: 0; instead; otherwise the checkbox may not be selectable, and accessibility keys may not work, as “display: none” tells the UA to not render the element. For some mobile browsers we had to use other tricks, too, but I do not remember exactly what they were (only “position” comes to mind). -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.