473,405 Members | 2,294 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,405 software developers and data experts.

The 1st Styled button has a black square around it

I am using styled buttons which look really good, my problem is that
the 1st button on the page has an ugly black square arround it. I
think this might indicate the default button when enter is pressed.
How can I remove this square.

HTML

<input type="submit" name="btnShowCurrent" value="Show Current"
id="btnShowCurrent" class="btn" onMouseover="btnHov(this, 'btn
btnHov'); return;" onMouseout="btnHov(this, 'btn'); return;"
onfocus="blur()" />

<input type="submit" name="btnShowAll" value="Show All"
id="btnShowAll" class="btn" onMouseover="btnHov(this, 'btn btnHov');
return;" onMouseout="btnHov(this, 'btn'); return;" onfocus="blur()" />

JavaScript

function btnHov( loc,cls)
{
if(loc.className)
loc.className=cls;
}
CSS

..btn
{
color: #000000;
background-color: #ccccff;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
font-style: italic;
font-weight: 700;
width: 75px;
text-decoration: none;
padding: 0 3px 0 10px;
background-image: url(/MT/img/RedArrowRight.png);
background-repeat: no-repeat;
border: solid 1px; /* #cccccc */
border-color: #eeeeee #666666 #666666 #eeeeee;
}
..btn:hover, .btnHov
{
border: solid 1px #000000;
background-color: #FF7200;
}
Jul 20 '05 #1
4 3704
mu**********@yahoo.com.au (muesliflakes) wrote:
I am using styled buttons which look really good, my problem is that
the 1st button on the page has an ugly black square arround it. I
think this might indicate the default button when enter is pressed.
Correct.
How can I remove this square.


You don't. Why would you want to remove the helpful visual cue that
the browser provides to the user? One could say that having hyperlinks
underlined in blue is ugly, since it messes up the appearance of your
text, but how else are the users going to know where the links are?

[code snipped]

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2
You do.

load the page and put some javascript beneath the page that goes like this

<script language="javascript">
document.getElementById("<id of your button").blur();// loose focus
</script>

Raymond Loman
e: ra*****@raymondloman.nl
i: http://www.raymondloman.nl

Harlan Messinger <hm*******************@comcast.net> wrote in message news:<2f********************************@4ax.com>. ..
mu**********@yahoo.com.au (muesliflakes) wrote:
I am using styled buttons which look really good, my problem is that
the 1st button on the page has an ugly black square arround it. I
think this might indicate the default button when enter is pressed.


Correct.
How can I remove this square.


You don't. Why would you want to remove the helpful visual cue that
the browser provides to the user? One could say that having hyperlinks
underlined in blue is ugly, since it messes up the appearance of your
text, but how else are the users going to know where the links are?

[code snipped]

Jul 20 '05 #3
ra*****@raymondloman.nl (Raymond Loman) wrote:

Please don't top post in these groups.

--
Spartanicus
Jul 20 '05 #4
If you would like to loose focus of an element after (during) loading the page:

Just place the code:
<script language="javascript">
document.getElementById("myImageId").blur();
</script>

in the bottom of the body of your html-document and the images (button,
whatsoever) should loose focus. That's what you (and sometimes I) want.

Hope this helps.

Raymond Loman
e: ra*****@raymondloman.nl
i: http://www.raymondloman.nl

Spartanicus <me@privacy.net> wrote in message news:<r1********************************@news.spar tanicus.utvinternet.ie>...
ra*****@raymondloman.nl (Raymond Loman) wrote:

Please don't top post in these groups.

Jul 20 '05 #5

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

Similar topics

1
by: Michael Allen | last post by:
Hi all you Java 2D gurus out there. I wonder if you might be able to help me. I've been dipping my toe into the world of Gaussian blurring and with the help of a few articles and some bashing my...
1
by: Richard Townsend | last post by:
Is there a known problem with images on disabled buttons on Tk8.4.4 ? If I create a button widget using a bitmap as the image and make the button disabled, not all of the image becomes stippled....
2
by: Dan V. | last post by:
Why does the banner image wrap around when I choose a small window size? http://officeactivate.com/schuit/index.shtml I am 1/2 way done a css book and am using this code from a CSS generator....
3
by: Sheellah | last post by:
Can someone please tell me why I get a black outline around a gif animation when I try to insert it into an AOL e-mail. How can I fix it? Thanks!
3
by: Mick Doherty | last post by:
Minimal Code and steps needed to show problem. Inherit from Button and set Region as below. \\\ Protected Overrides Sub OnPaint(ByVal pevent as PaintEventArgs) MyBase.OnPaint(pevent)...
1
by: TomB | last post by:
Hello, I just noticed something odd in Opera with some of the css-styled buttons on my website. When I select another input field on my form, the border on the "submit" button gets thinner. Is...
3
by: John | last post by:
Does anyone know the csc command to put a black border around your whole page? Any help would be great. Thanks!
7
by: Steve Swift | last post by:
How close can you get to making a submit button look like a link? Answers to the inevitable questions: 1. Because I don't want my email address (which would have to be part of the URL in a...
5
by: dougancil | last post by:
I have an image file that when I look at it in design mode, it looks fine. It has a border of 15 around it. When I look at it in Opera, the border isn't there, but if I look at it in IE8, it shows as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.