Problem with bootstrap and adding new styles [closed]

1

I have a project with bootstrap and I do not know how to add a new style of checkbox.

I have already downloaded the files, but I do not know where to add them to the project or how to use the styles. It's in Visual studio Asp.Net

    
asked by Tomas Morales 07.10.2016 в 01:44
source

3 answers

2

Make sure you call your styles after calling the Bootstrap styles so that the styles you try to modify are overwritten

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<!-- Tema opcional -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">
<!-- Mi hoja de estilos -->
<link rel="stylesheet" href="style.css">

If you put it on the contrary it will seem that your styles are not being applied, but it's just that Bootstrap's are overwriting yours

    
answered by 08.10.2016 в 21:26
2

In addition to the previous answers, I recommend a toggle to make it look better graphically.

Here is an example (also in jsfiddle ):

<!-- Toggle Switch -->
<link href="https://cdn.jsdelivr.net/css-toggle-switch/latest/toggle-switch.css" rel="stylesheet" />

<!-- HTML -->
<label class="switch-light switch-candy">
  <input type="checkbox">

  <strong>
    Checkbox
  </strong>

  <span>
    <span>Apagado</span>
    <span>Encendido</span>
    <a></a>
  </span>
</label>
    
answered by 13.03.2017 в 19:33
0

You must copy the files in the Content folder, if it is an MVC project, to use them you must include them in the _Layout view so that they are available in all the pages that use that Layout , if only you occupy the style in some pages, but it is best to add them only in these.

To use a style the most secilla way is with the tag

<link rel="stylesheet" href="ruta/al/styles.css">

If the style consists of several files, it is best to do a bundle On Youtube there are several tutorials on the subject, you could see this

    
answered by 07.10.2016 в 22:27