473,805 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
2 7520
Scripsit ru**********@gm ail.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/

Jan 15 '07 #2

ru**********@gm ail.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/cascad...ascading-order
http://www.w3.org/TR/REC-CSS2/cascade.html#specificity

Jan 15 '07 #3

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

Similar topics

15
31815
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and help. Regards
2
4746
by: Johnny | last post by:
Sorry I posted this post earlier but got the name and subject the wrong way round (new to this!) so it perhaps didn't look right Sorry for that. But please please answer if you know anything about it.. Thanks I've got a procedure that is responsible for performing the following operations on a richtextbox 1) determining what parts of the text to forma 2) formatting specific ranges of text a specific color I need to do this whenever the...
7
3344
by: Arnold | last post by:
Greetings Gurus, In a mainform's header, I have a combobox named comboStudents. The rowsource for this combobox is: SELECT -999 As StudentID, "<Add New Student>" As FullName, "aaa" As LastName, "x" As FirstName From qryStudents UNION SELECT StudentID, FullName, LastName, FirstName FROM qryStudents ORDER BY LastName;
1
1807
by: Gap | last post by:
Hello all, I want to create a page with an image and when the cursor is moving over the image (e.g. over text on the image the text is highlighted or changes color or something similar. So that the user can see what he would pick (= what link he would follow when he picks that text/item I am not sure if this explanantion is understandable. Maybe like a map of the world and if you move the mouse over a country e.g. france the name of...
1
2023
by: mikename | last post by:
Hi, I'm currently working on a project which is essentially a clickable world map. I have successfully mapped the image and using a OnMouseOver = "Continent()" OnMouseOut = "World()" command in each mapping line ie. <area shape="poly" onmouseover="NA()" onmouseout="World()" coords="(lotsonumbers)". In my continent functions I change the image using something like: function Africa()...
5
1470
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, 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
7
2341
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 the innerHTML of a div) and add tags to change the styles of several keywords? For instance, I might want the words "and", "or" and "xor" to be bold and the words "c_white", "c_red" and "c_orange" to appear as maroon... (it's for a syntax...
1
1867
by: thetechgeek | last post by:
Hey all, I've created a pretty nice-looking drop-down menu, and I need to prevent users form highlighting the text in the menu item, because it looks kind of ugly. Here's an snippet of my menu structure: <div id="menu"> <ul> <li><a class="first_btn" id="file_btn" onClick="ShowHideFile();">File</a> <ul id="file" onmouseover="OverFileMenu();" onmouseout="OutFileMenu();"> <li><a...
1
2787
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 objHighLight As New highlight(Keyword, "<span class='searchKeyword'>{keyword}</span>") ContentFor = objHighLight.process(ContentFor, False, False) Return ContentFor 'Dim RegExp As Regex = New Regex(Keyword.Replace(" ", "|").Trim(),...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.