10

I am a limited knowledge in html and css. Please excuse if it is a silly question. I have tried in different ways, but could not solve this issue.

http://teddyslist.com/dev/register.php

At the bottom of the page, there is a radio button saying "Preferred mode of contact".

<input type="radio" name="preferredcontact" value="P"> Phone
<input type="radio" name="preferredcontact" value="E"> Email

Radio buttons are showing in Firefox and even on IE. But they are not showing in Chrome and Safari. It is very strange to me. I think there is some conflict in CSS.

cimmanon
  • 67,211
  • 17
  • 165
  • 171
Soumya
  • 123
  • 1
  • 1
  • 6

4 Answers4

24

When I inspected your code, I could see that you have a style -webkit-appearance: none; that is specified for input, textarea, button in realsite.css

The CSS is as follows

input, textarea, button {
    -webkit-appearance: none;
    -webkit-font-smoothing: antialiased;
    resize: none;
}

To make the radio buttons visible, either remove -webkit-appearance: none; from the CSS OR add a style as below

input[type="radio"]{
    -webkit-appearance: radio;
}

Here is a screenshot

enter image description here

ZaidRehman
  • 1,631
  • 2
  • 19
  • 30
Lal
  • 14,726
  • 4
  • 45
  • 70
4

I realize that this post does not mention Bootstrap CSS as a keyword or tag but one thing I would mention is that if you are having the exact same result which is that the radio buttons do not show up in Chrome but are present in Firefox and IE, but, you are also using Bootstrap CSS then you will want to ensure that you do not have the class name "form-control" on the radio button input tag specifically. Essentially, you can use the class name "form-control" on every other form element type except the radio button input type. Using that class "form-control" on a radio button tag makes it disappear therefore just remove the class attribute and the radio button will appear. At first I thought this was a Chrome issue but found the radio buttons would appear when I removed the reference to the Bootstrap CSS.

rg288dev
  • 61
  • 4
1

If you use :

input{

   display:none;

}

then radio button will not be displayed. By default it takes the value display: none;

Change it to:

input{

   display: inline;

}

and it will be visible.

Vega
  • 27,856
  • 27
  • 95
  • 103
Seth
  • 331
  • 4
  • 9
0

You have

-webkit-appearance: none;

set on checkboxes and radio. You need to style the checkboxes for them to appear, or simply get rid of the appearance: none

How to style checkbox using CSS?

Community
  • 1
  • 1
Kevin
  • 348
  • 4
  • 13