Class selector in CSS

2

I'm not able to reference a <div> , which is in my index.html file, through my .css file.

I have the following structure in my index.html file:

<!-- Content -->
<div class="container">
    <div class="row">
        <div class="div-address">
            <h3>Endereço 1</h3>
            <p>Endereço 1</p>
        </div>
    </div>
</div>

I'm trying to reference <div class=""div-address> , however, the settings I'm making in the .css file are not being applied to this div .

The reference in my .css file is given by:

.div-address{
  border: 1px solid;
  font-family: 'Boogaloo', cursive;
}

This structure is implemented just below the structure defined in the .css file. I did this thinking that my style might override some style already in the Bootstrap CSS framework.

NOTE:

  • I'm using the Bootstrap framework
  • The file structure is correct (index.html, css folder, js folder etc.)
  • In the first line of my .css file I'm importing the font used for the div ( @import url("https://fonts.googleapis.com/css?family=Boogaloo|Yesteryear"); )
  • When I put the ".div-address" style in my index.html file, the style is implemented correctly in div . I should be making some mistake when referring to classes in CSS or something is overwriting my style created in the .css file.

    Well, I'm still new to web development and I ask you to help me solve this problem.

    Thank you.

        
    asked by anonymous 01.01.2017 / 23:03

    1 answer

    1

    I think it would be best to put all your styles that are not part of Bootstrap into a different file, and to link it after all css links. Such as:

    <link href="css/bootstrap.css" rel="stylesheet"> 
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.‌​7.0/css/font-awesome‌​.min.css"    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jque‌​ry.min.js"></script><scriptsrc="js/bootstrap.min.js"></script>
    
    <!-- Aqui vem seu estilo -->
    <link href="css/meu-arquivo-de-estilo.css" rel="stylesheet"> 
    
        
    01.01.2017 / 23:34