Search code examples
htmlcsstwitter-bootstraptwitter-bootstrap-4

How to make bootstrap headings responsive?


I'm making a bootstrap website. Everything is working smooth on all the screen sizes but the heading(h1) remains fixed size. It is too big for small screens. How can I fix the bootstrap h1 or headings in general.


Solution

  • You can use @media for this

    @media screen and (max-width: 768px) {
        h1{
            font-size:14px;
        }
    }
    

    That means less than 768px the h1 tag font size will be 14px.

    Like this you can set for all pixel you required.