Underline just the S in the Submit Button?

S

Scott Townsend

I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-
 
A

Aaron Bertrand - MVP

Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>

Please post future client-side questions to an HTML newsgroup...
 
B

Bob Barrows [MVP]

Scott said:
I have a form that I allow the user to use the ALT-S key to submit.

I'd like to have just the S in the Submit button underlined, Is this
possible?

Thanks,
Scott<-

I do not think this is possible. The text shown on a submit button is set in
the value attribute which can contain only characters (no style properties
....).

You could create an image and use the IMG tag as your Submit button ...

This is more of an HTML issue than as ASP issue so you may wish to ask on a
more HTML-focussed newsgroup.

HTH,
Bob Barrows
 
S

Scott Townsend

Thanks for the Tip.

Aaron Bertrand - MVP said:
Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>

Please post future client-side questions to an HTML newsgroup...
 
D

Dave Anderson

Aaron said:
Why is this an ASP question? ASP doesn't know what a button is.

<button><u>S</u>ubmit</button>

<U> is deprecated:
http://www.w3.org/TR/html401/appendix/changes.html#idx-deprecated


Fortunately, the same can be accomplished with styles. One example:

BUTTON DIV:first-letter { text-decoration:underline }
-- and --
<BUTTON><DIV>Submit</DIV></BUTTON>



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
A

Aaron Bertrand - MVP

<U> is deprecated:

Oh come on now. Let's leave the HTML discussions to a more appropriate
forum. Next we'll be talking about how <button> isn't supported in Netscape
3.0.
 
B

Bob Barrows [MVP]

Aaron said:
Oh come on now. Let's leave the HTML discussions to a more
appropriate forum. Next we'll be talking about how <button> isn't
supported in Netscape
3.0.

:)
I wasn't even aware there WAS a <button> element. I assumed the OP was
asking about an <input> tag whose type was "submit".

Bob Barrows
 
R

Ray at

Dave Anderson said:
Fortunately, the same can be accomplished with styles. One example:

BUTTON DIV:first-letter { text-decoration:underline }
-- and --
<BUTTON><DIV>Submit</DIV></BUTTON>

Isn't that :first-letter pseudo class only supported by Opera or something?

Ray at work
 
A

Aaron Bertrand - MVP

You can hook any event to a <button>, a form submit, an alert();, a function
pickMyNose();, etc.

But let's stay on topic! "<u> is deprecated." I oughta... let me know when
you come across a browser that stops supporting the <u> tag.
 
D

Dave Anderson

Aaron said:
Oh come on now. Let's leave the HTML discussions to a more
appropriate forum. Next we'll be talking about how <button> isn't
supported in Netscape
3.0.

Please.

Keeping an eye to the future is far different from bending over backward to
work in the past. Nobody uses Netscape 3 anymore, but all of us will use
future browsers. And deprecating <U> has been on the table for seven years:
http://www.w3.org/TR/WD-html40-970708/appendix/changes.html#h-13.1.1.2



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

Dave Anderson

Ray at said:
Isn't that :first-letter pseudo class only supported by Opera or
something?

No, and that would be irresponsible:
http://www.w3.org/TR/CSS2/selector.html#x52

IE6, Opera 7, and FireFox 0.8 all dig it. Oddly enough, they all /seem/ to
follow the standard for the pseudo-element. I half expected IE to allow it
on BUTTON, but IE seems to correctly restrict it to block-level elements.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
A

Aaron Bertrand - MVP

follow the standard for the pseudo-element. I half expected IE to allow it
on BUTTON, but IE seems to correctly restrict it to block-level elements.

So your solution doesn't work for IE? ;-)
 
D

Dave Anderson

Aaron said:
...let me know when you come across a browser that stops
supporting the <u> tag.

I know of plenty, if one of these is present:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

Dave Anderson

Aaron said:
So your solution doesn't work for IE? ;-)

On the contrary. I never give solutions that don't work in IE, Mozilla AND
Opera -- at least not when there is a cross-browser solution or when I'm
qualifying it as such.

And my base standard isn't very high -- pretty much anything that will work
in IE 5 or Mozilla 1. That encompasses most of HTML4, CSS1, and DOM Level 1,
plus good chunks of DOM2/CSS2.

I should confess that I consider using deprecated elements no great sin.
Even if my browser doesn't see the underlined first letter, I am essentially
unaffected.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

Dave Anderson

Aaron said:
Come on Dave, is this an ASP forum or not?

<bored of HTML crap>

No. Is it a VBScript one?

<bored with VBScript crap>



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
A

Aaron Bertrand [MVP]

No. Is it a VBScript one?
<bored with VBScript crap>

I can write ASP in several languages, including VBScript. It just happens
to be the language used in 95% of the ASP pages I have seen or worked with.

I can not write ASP code in HTML (whether I prefer VBScript, JScript,
PerlScript, what have you). HTML is merely a by-product of ASP... granted,
it is the desired result. But differences in HTML output or interpretation
have *ALWAYS* been redirected from this group to a more appropriate
client-side group. Because the end result is in question, and that end
result could have been created from ColdFusion, Perl, etc etc.

Discussions about whether a specific HTML tag can be proven to be invalid
with one-off things like DOCTYPE declarations are not on-topic here.

Discussions about ASP techniques (which happen to be demonstrated in
VBScript, for the most part) certainly are. And of course if ever a user
says, "that's all fine and good, but I want my answer in JScript" they are
accommodated.

Just because you prefer JScript doesn't make VBScript off-topic.
Client-side VBScript, hey I'm with you there, as with clinet-side JScript.
But server-side? Not a chance.

If you just want to talk JScript without the ASP part, and without the
majority of the population polluting your discussion environment with
VBScript crap, might I suggest microsoft.public.scripting.jscript?
 
R

Roland Hall

in message
: > follow the standard for the pseudo-element. I half expected IE to allow
it
: > on BUTTON, but IE seems to correctly restrict it to block-level
elements.
:
: So your solution doesn't work for IE? ;-)

It works.

http://kiddanger.com/lab/submit.html

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
R

Roland Hall

in message
: > <U> is deprecated:
:
: Oh come on now. Let's leave the HTML discussions to a more appropriate
: forum. Next we'll be talking about how <button> isn't supported in
Netscape
: 3.0.

Hmmm... who was the first to post with an HTML response? (O:=
 
A

Aaron Bertrand [MVP]

Hmmm... who was the first to post with an HTML response? (O:=

And did you read the whole response?

Seriously now...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top