Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Circular button showing rectangular background upon click

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #200115
    samvb
    Participant

    Hi,

    I have this button with border-radius:50% so it is circular and goes well with the design. Problem is on desktop browsers it shows a rectangular thin line border while in touch screen, it shows a full rectangular background behind the circular element upon tap/touch.

    {border:0;background-color:#F0F0F0;border-radius:50%;width:200px;height:200px}

    The rectangular shape in touch screens appear in areas not covered by the circle. While in desktops, the thin lines exists all the way.

    Any tip to remove them and button remains the same in behavior on click/tap?

    #200124
    Paulie_D
    Member

    We can’t debug code we haven’t seen.

    A Demo in codepen would be useful.

    #200130
    samvb
    Participant

    #btn {border:0;background-color:#F0F0F0;border-radius:50%;width:200px;height:200px}

    html:

    <input type=”button” id=”btn” value=”Click me”>

    During click, a border appears. During tap, a background color of someking is shown. the circular button have a background of F0F0F0 against a white a body background.

    Hope that’s enough.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.