473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Highlighting image button

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

Jan 15 '07 #1
5 1457
ASM
ru**********@gmail.com a écrit :
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.
Except with NetsCape 4.5 you don't need html border=0
style your image with that.

About styles changes, specially with colors, always use css classes.

<input type=image class="img_button"
onclick="this.className = this.className=='img_button'?
'seen' : 'img_button';"
blah >

css :
=====
..img_button { border: 0px; }
..seen { border: 3px solid red; }


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 15 '07 #2
ASM wrote on 15 jan 2007 in comp.lang.javascript:
About styles changes, specially with colors, always use css classes.

<input type=image class="img_button"
onclick="this.className = this.className=='img_button'?
'seen' : 'img_button';"
or just:

onclick="this.className = 'seen';"

or:

onmousedown = "this.className = 'pressed';"
onmouseup = "this.className = 'unpressed';"

blah >

css :
=====
.img_button { border: 0px; }
.seen { border: 3px solid red; }
This will move the page content.

Try:

..img_button { border: 3px solid transparent; }
..seen { border: 3px solid red; }

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 15 '07 #3
ASM
Evertjan. a écrit :
ASM wrote on 15 jan 2007 in comp.lang.javascript:
>css :
=====
.img_button { border: 0px; }
.seen { border: 3px solid red; }

This will move the page content.
Absolutely ! it's :
- funny
- more visual
:-)
Try:

.img_button { border: 3px solid transparent; }
And my funny effect ?
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 15 '07 #4
ASM wrote on 15 jan 2007 in comp.lang.javascript:
Evertjan. a écrit :
>ASM wrote on 15 jan 2007 in comp.lang.javascript:
>>css :
=====
.img_button { border: 0px; }
.seen { border: 3px solid red; }

This will move the page content.

Absolutely ! it's :
- funny
- more visual
:-)
>Try:

.img_button { border: 3px solid transparent; }

And my funny effect ?
Haha!

"funny haha" or "funny peculiar"? ;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 15 '07 #5
ASM
Evertjan. a écrit :
>
"funny haha" or "funny peculiar"? ;-)
grote grote lach

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Jan 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: russiandevil | last post by:
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,...
1
by: russiandevil | last post by:
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,...
7
by: Leif902 | last post by:
After much searching of google, the closest I can find is highlighting search terms... however, this is not what I wanted to do. Does anyone know how to parse through a specific element (lets say...
1
by: alamodgal | last post by:
hiiiiiii I have a problem in highlighting searching keyword.Actually im using this function for searching Public Function HighLight(ByVal Keyword As String, ByVal ContentFor As String) Dim...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.