Different checkbox and radio button position in internet explorer

Asked

Viewed 163 times

1

I’m using Bootstrap 4 and the same form is different in IE.
The image below is the IE and some elements is maladjusted. inserir a descrição da imagem aqui

The image below is a Google Chrome print is correct. inserir a descrição da imagem aqui

<div class="form-group col-md-2 text-center pt-3">
                            <a href="#" class="text-uppercase" style="color: #fff;"><strong>Termos de uso</strong></a>
                            <div class="form-check mt-1">
                                <input class="form-check-input" type="checkbox" id="termo_aceitacao" name="termo_aceitacao" required>
                                <label class="form-check-label" for="termo_aceitacao">
                                    Aceito
                                </label>
                            </div>
                            <button type="submit" class="btn btn-success mt-2"><strong>AVANÇAR</strong></button>
</div>
  • This is the IE11??

1 answer

1


Young man I switched the position:absolute for position:relative and it worked.

But notice that I switched right into the tag <input> using a style="" as the . form-check-input class can be used elsewhere.

The ideal then would be to make one override guy:

.form-check-input.debug {
    position:relative
}

Follow Snippet, you can test on IE

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name=
 content=
>
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous" />
    <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<style>
    
</style>
</head>
<body>
    
<div class="form-group col-md-2 text-center pt-3">
    <a href="#" class="text-uppercase" style="color: #fff;"><strong>Termos de uso</strong></a>
    <div class="form-check mt-1">
        <input class="form-check-input" type="checkbox" id="termo_aceitacao" name="termo_aceitacao" required style="position: relative">
        <label class="form-check-label" for="termo_aceitacao">
            Aceito
        </label>
    </div>
    <button type="submit" class="btn btn-success mt-2"><strong>AVANÇAR</strong></button>
</div>
    
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>

  • Another option would be not to use bootstrap for this but I don’t think it’s a good option to do everything with bootstrap and a css component. Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.