How to center a title in the header using class attributes?

0

I started studying Bootstrap now and I'm having trouble understanding and modifying the CSS tags of the folder I downloaded on their website, so it would be easier to edit the part HTML

I need to centralize the SIGN UP text, but I'm not getting any and in the CSS files, several quotes are made about the class and it looks like it is overwritten several times, so if I mess with one, I need to change the others too.

<headerclass="masthead clearfix navbar navbar-dark bg-dark">
    <div class="logo">
        <img src="images/drawing2.png" width="9%"/>
    </div>

    <div class="inner">
        <div class="nav justify-content-center m-auto">
            <h3 class="masthead-brand"> CADASTRE-SE </h3>
        </div>
    </div>
</header>
    
asked by anonymous 25.10.2017 / 00:10

1 answer

0

You can center the text using the text-center class by simply entering it in the class attribute of the H3 tag and the class attribute of the img img-fluid and get the attribute width , also create the Style Sheet :

<style>
img {
    max-width: 100%; /* largura máxima de 100% */
}
</style>

img {
  max-width: 100%;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet">
<header class="masthead clearfix navbar navbar-dark bg-dark">
    <div class="col-xs-12 col-md-2 logo">
        <img src="https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo_TV_2015.png"class="img-fluid" />
    </div>

    <div class="col-xs-12 col-md-8 inner">
        <div class="nav justify-content-center m-auto">
            <h3 class="masthead-brand text-center"> CADASTRE-SE </h3>
        </div>
    </div>
</header>

Click Página toda for better viewing.

References

25.10.2017 / 00:20