lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] HTML BUTTON element


From: Tim Chase
Subject: Re: [Lynx-dev] HTML BUTTON element
Date: Thu, 28 May 2009 13:32:38 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

Actually the button tag behaviour in all browsers i've tested
is to submit the form in which it is, without any javascript.
The reason i'm using it is because it can be easily styled
with css styles.

I'm not sure either is particularly harder to style than the other:

=======================================
<html>
<head>
<title>test</title>
 <style>
  #a {
  background-color: red;
  padding: 3em;
  }
  #b {
   background-color: green;
   padding: 7em;
   }
  .c {
   border-width: 3em;
   }
 </style>
</head>
<body>
 This is a
<button id="a" class="c" value='Hello'>Button <b>with</b> markup</button>
 and this is
<input type="submit" id="b" class="c" value="&lt;input type='button'&gt;" />
</body>
</html>
=======================================

The biggest difference I've found (beyond Lynx's rendering) is that you can put HTML markup inside the <button> but not inside the <input type='button'>. However both FireFox and IE allow for styling either (shown above styling via both ids and classes)

Moreover, Lynx does not hide it, but renders a useless
[BUTTON] text, why?

I don't know how feasible it is, but it might not hurt to treat a <button> tag as an <input type='submit'>

-tim










reply via email to

[Prev in Thread] Current Thread [Next in Thread]