Click here to get back home

Highlighting image button

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Highlighting image button russiandevil 01-14-2007
Get Chitika Premium
Posted by russiandevil on January 14, 2007, 10:59 pm
Please log in for more thread options


hi,

Does anyone have an idea on how I'd go about highlighting (with a
border, or something equally effective) a input button of type 'image'
(i.e. <input type=image alt=Login src=http://<etc, path to image file>
Login)

For most of the other element, applying a style such as
"background-color: red; border-color: red; border-width: thick" seems
to be sufficient, however for image buttons (especially those that have
"border=0" as a part of their HTML definition) this seems to be rather
ineffective.

Any suggestions would be welcome,

regards,
Greg


Posted by Jukka K. Korpela on January 15, 2007, 6:02 am
Please log in for more thread options


Scripsit russiandevil@gmail.com:

> Does anyone have an idea on how I'd go about highlighting (with a
> border, or something equally effective) a input button of type 'image'

Perhaps, but why do you ask this in an HTML group?

> For most of the other element, applying a style such as
> "background-color: red; border-color: red; border-width: thick" seems
> to be sufficient, however for image buttons (especially those that
> have "border=0" as a part of their HTML definition) this seems to be
> rather ineffective.

Rrright. Your mileage surely varies, since browsers differ in their CSS
support, but this _isn't_ an HTML issue.

What _is_ an HTML issue is that you would get better results by using a
normal submit button, <input type="submit" ...>, _especially_ since_ it
looks similar to the normal submit buttons on web pages. Besides, some
modern browsers change the visual appearance of a normal submit button on
mouseover _by default_.

Using an image submit button is mostly just a way to create problems that
wouldn't exist if you used a normal submit button.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Posted by Roy A. on January 15, 2007, 6:14 am
Please log in for more thread options



russiandevil@gmail.com skrev:
> hi,
>
> Does anyone have an idea on how I'd go about highlighting (with a
> border, or something equally effective) a input button of type 'image'
> (i.e. <input type=image alt=Login src=http://<etc, path to image file>
> Login)
>
> For most of the other element, applying a style such as
> "background-color: red; border-color: red; border-width: thick" seems
> to be sufficient, however for image buttons (especially those that have
> "border=0" as a part of their HTML definition) this seems to be rather
> ineffective.

In an eigth year old recommandation from W3C i found this:

'outline' Value: [ <'outline-color'> || <'outline-style'> ||
<'outline-width'> ] | inherit

http://www.w3.org/TR/REC-CSS2/ui.html#dynamic-outlines

That would meen you could use somthing like:

.highlight { outline:red solid thick" }

But if that don't apply, try borders. If the image buttons have
"border=0" as a part of their HTML definition you could override that
with a more spesefic rule like:

form .highlight { border: ... }

http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order
http://www.w3.org/TR/REC-CSS2/cascade.html#specificity


Similar ThreadsPosted
Dynamic image which is highlighting/increasing the text/area when the curser moves over it? July 20, 2006, 1:45 am
Image button May 16, 2007, 12:02 am
Problems with using an image in a submit button August 27, 2004, 8:43 am
submit button image -- can u do rollover?? September 15, 2004, 12:53 pm
making an image part of the Radio button November 22, 2007, 11:43 am
highlighting an accesskey April 16, 2008, 8:54 am
Syntax highlighting in TEXTAREA - possible? October 22, 2005, 4:59 pm
Highlighting a Link Destination March 10, 2007, 10:25 pm
Simple table row highlighting - on mouseover October 13, 2004, 10:02 am
Creating image maps with Adobe Illustrator or Image Ready. March 8, 2005, 12:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap