469,289 Members | 2,341 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

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 3607
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Michael Allen | last post: by
1 post views Thread by Richard Townsend | last post: by
2 posts views Thread by Dan V. | last post: by
3 posts views Thread by Sheellah | last post: by
3 posts views Thread by Mick Doherty | last post: by
1 post views Thread by TomB | last post: by
3 posts views Thread by John | last post: by
7 posts views Thread by Steve Swift | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.