Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Link button
May 5, 2009, 12:18 pm
rate this thread
forgotten, so bear with me.
In my website I choose to link pages with 'moving' buttons.
Up until now and with help here I have used a stylesheet (in the example I
have put it on the page, but usually it is elsewhere)
Below the button I have added a button as a form input. It works well
enough and needs no CSS. I realize that there really is no form, but apart
from that is the top one 'better' and if so why?
The test page is http://www.jimscot.myby.co.uk/Button_tester_1.html
Re: Link button
Yout JS does nothing in Firefox. Clicking the button does what it's
supposed to do, but without any JS working: it takes me to where the
href-attribute of the a-element around the input points.
| <form action="..."><input type="submit" value="TEXT"></form>
that would at least be a valid form.
Even better would be the following solution (also not valid HTML 4.01
| <a href="..."><button>TEXT</button></a>
But the best solution is the one you mentioned yourself: take a <a> and
format it using CSS. Why is this better? Becaus it's valid (means
syntactivcally correct) and semantical correct (means you use a <a> as
link as it's specified and not an element which originally had a
different meaning just because it looks like you want it to).
Re: Link button
On Tue, 05 May 2009 23:01:35 GMT, Raymond Schmit wrote:
I'm a 'tweaker' with lots of time on my hands, but limited programming
skills and just fancied a change. However I like to sus things out before
finding afterwards that I have done something that I may regret.
The second (form method) looks more like the buttons you find in windows
applications ... sort of 'professional' I suppose.
My CSS version looks - well less 'slick'
I can accept "You cannot do that because it will all go pear shaped", but
"that's bad form old chap" cuts no ice.
- » Is there a trick for clear:left not to affect parent divs
- — Next thread in » HTML Markup Language