Use two style sheets in an html? [closed]

-6

I have a question, I can use two style sheets in the same html example, I have imported two style sheets ...

style1.css and style2.css in my html I have elements that I want to use styles of a certain sheet and others of another, is it possible ??? if that's how I do it

example: I have bootstrap and another framework that has its style sheets each, I could not mix in a single .css because each one is from a different framework as I can use the 2?

    
asked by noobie dev 23.06.2017 в 21:48
source

2 answers

-2

You can use the ones you want.

If both have styles for the same element, the important thing is the order in which they are calling on the page.

The one who is calling last has preference.

But you also have to remember the specificity that is here .

    
answered by 23.06.2017 / 21:53
source
1

style sheets are applied in the order in which you put them

 <link rel="stylesheet" href="/css/misestilos.css">
 <link rel="stylesheet" href="/bootstrap/css/bootstrap.css">

the bootstrap styles will be applied but if I change my attribute in my style sheet called mystyles.css any attribute, this one will be reflected the order of application of styles is in css the first thing that is applied in the html are attributos style html example

 <textarea class="form-control"  style="border-color: #2d2d2d" rows="3">

then the styles contained in the style sheets sorted in order of priority first which will be imposed on all and so on now within the same style sheet will also be imposed the most specific example

div >p>a

will be imposed on

div>a

because the first line is more specific

    
answered by 23.06.2017 в 21:59