The 1st Styled button has a black square around it

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • muesliflakes

    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="btnShowCu rrent" value="Show Current"
    id="btnShowCurr ent" class="btn" onMouseover="bt nHov(this, 'btn
    btnHov'); return;" onMouseout="btn Hov(this, 'btn'); return;"
    onfocus="blur() " />

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

    JavaScript

    function btnHov( loc,cls)
    {
    if(loc.classNam e)
    loc.className=c ls;
    }


    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.p ng);
    background-repeat: no-repeat;
    border: solid 1px; /* #cccccc */
    border-color: #eeeeee #666666 #666666 #eeeeee;
    }
    ..btn:hover, .btnHov
    {
    border: solid 1px #000000;
    background-color: #FF7200;
    }
  • Harlan Messinger

    #2
    Re: The 1st Styled button has a black square around it

    muesliflakes@ya hoo.com.au (muesliflakes) wrote:
    [color=blue]
    >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.[/color]

    Correct.
    [color=blue]
    >How can I remove this square.[/color]

    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.

    Comment

    • Raymond Loman

      #3
      Re: The 1st Styled button has a black square around it

      You do.

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

      <script language="javas cript">
      document.getEle mentById("<id of your button").blur() ;// loose focus
      </script>

      Raymond Loman
      e: raymond@raymond loman.nl
      i: http://www.raymondloman.nl

      Harlan Messinger <hmessinger.rem ovethis@comcast .net> wrote in message news:<2fue80hu2 td13dqgfmudojts ethk6fbg2n@4ax. com>...[color=blue]
      > muesliflakes@ya hoo.com.au (muesliflakes) wrote:
      >[color=green]
      > >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.[/color]
      >
      > Correct.
      >[color=green]
      > >How can I remove this square.[/color]
      >
      > 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][/color]

      Comment

      • Spartanicus

        #4
        Re: The 1st Styled button has a black square around it

        raymond@raymond loman.nl (Raymond Loman) wrote:

        Please don't top post in these groups.

        --
        Spartanicus

        Comment

        • Raymond Loman

          #5
          Re: The 1st Styled button has a black square around it

          If you would like to loose focus of an element after (during) loading the page:

          Just place the code:
          <script language="javas cript">
          document.getEle mentById("myIma geId").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: raymond@raymond loman.nl
          i: http://www.raymondloman.nl

          Spartanicus <me@privacy.net > wrote in message news:<r1m190par qooh845agf5hjgk 202amuuc29@news .spartanicus.ut vinternet.ie>.. .[color=blue]
          > raymond@raymond loman.nl (Raymond Loman) wrote:
          >
          > Please don't top post in these groups.[/color]

          Comment

          Working...